May 12, 2009

The Variable Explorer

Filed under: Automation,General,Scripting — Marcus Tettmar @ 2:15 pm

An experienced Macro Scheduler scripter was recently trying to figure out why the following code wasn’t doing what he expected:

If>seg_1=05
  Let>monLtr=mm
Endif

Apparantly monLtr was always being set to 05.  This told me that “mm” must have been a variable which had earlier been set to 05.   But my friend said “I’ve looked all through the code I can’t see where “mm” is set anywhere”.  

Then I reminded him of the Variable Explorer.  “The what?” he asked.

varexplorerUnder the editor select Tools/Variable Explorer or hit Ctrl-Alt-V and you’ll get a box like this one.  It shows a list of all the variables created by your script.  

Bingo!  There’s mm.  Expand it and you’ll see all the lines where it is set/created.   In this case it’s created on line 40 by the Min command.  

In a long script it’s easy not to see the obvious.  The Variable Explorer makes it easier.

Of course, it would also be sensible to use a better naming convention for the variable to avoid such confusion.  Or use VAREXPLICIT or he could have used {“mm”} to specify the literal string value.   But don’t forget the Variable Explorer as it can save a lot of hunting around.

April 30, 2009

Regular Expressions for Dummies

Filed under: General,Scripting — Marcus Tettmar @ 2:19 pm

I recently stumbled upon this series of video tutorials on Regular Expressions:

Regular Expressions for Dummies

If you want to know how to get some power of out of Macro Scheduler‘s new RegEx function you might find the above free video tutorial useful.

One resource seen in the video that I didn’t know about is RegExr – an Online Regular Expression Testing Tool.  It’s free to use and there’s a desktop version you can download too.

But my favourite RegEx tool is RegExBuddy from JG Soft.  An invaluable tool for anyone working with Regular Expressions.  The author also maintains this excellent Regular Expression resource which includes a tutorial, examples and references.

April 23, 2009

Macro Microdecisions for Macro Economic Impact

Filed under: Automation,General — Marcus Tettmar @ 8:09 am

While many of our customers use Macro Scheduler for automating key business processes I would hazard a guess that a large number of people are using the tool to automate smaller tasks related to their own individual work. In themselves these tasks may not appear too important, and may not even be visible to the upper echelons of management concerned with improving efficiencies of larger systems. But, improving the efficiency of many small tasks can have a big impact on the overall profit and loss of a business.

In “Microdecisions for Macro Impact” on the Harvard Business Review blog, Tom Davenport talks about how small decisions made lots of times by many employees can have a major impact on the business. How these small “microdecisions” are addressed and improved can impact overall performance.

Tom suggests that one approach to improving a micro-decision is to automate it. Automation of a repetitive task not only speeds it up but removes the chance for error. It also frees up the employees’ time to work on other matters. This will come of no surprise to my regular readers and Macro Scheduler users.

As the article mentions, one simple way to improve micro-decisions is to create a checklist to ensure the worker does not miss any key steps. Another common approach is to draw up a flowchart. With Macro Scheduler Pro Enterprise we can combine flowcharts with automation. Macro Scheduler Pro Enterprise includes Workflow Designer which allows you to flowchart a process graphically. This is a great way to analyse and document a business process. Unlike regular flowcharting tools however, once the flowchart has been created and refined you can then start adding real code to it. You then have a documented process which can actually carry out the task for you. The documentation evolves into the solution. If you’ve timed the manual process you can then find out what kind of efficiency savings you are making by analysing the log files (or building in timers in your code) and comparing.

A little goes a long way – automate lots of small procedures like this and you could boost your organisation’s overall performance.

March 29, 2009

MJT Net Gearhead Spotted in the New Forest

Filed under: General,Uncategorized — Marcus Tettmar @ 8:40 pm

If you were down in the woods yesterday you may have been in for a surprise. For in the New Forest, Southern England, you might have seen 400 participants of the first Questars Adventure Race of 2009, running, biking and canoeing.

MJT Net Adventure Race Team

Three of those people were sponsored by MJT Net and wearing our lovely new MJT Net Gearhead T-Shirts. We were not let down – the team came in 8th place in the Novice Mixed category. An excellent result for their first ever adventure race.

MJT Net Adventure Race Team

Congratulations to Angela Fulcher, Dan Spry and Tom Lloyd-Edwards, and thanks for wearing the T-shirts!

March 25, 2009

IE8, Vista, UAC and WebRecorder/VBScript Web Macros

Filed under: General,Vista — Marcus Tettmar @ 11:50 am

I just upgraded to IE8 on a new Vista desktop with UAC enabled out of the box. Now, WebRecorder macros and VBScript macros which automate Internet Explorer fail to work unless Macro Scheduler is run as Admin. IE’s Protected Mode is turned off, and “Allow scripting of Internet Explorer webbrowser control” is enabled. But if you try to run a WebRecorder macro without elevating Macro Scheduler to run as admin you will see a delay followed by:

Error Calling DLL – Possible wrong number or type of parameters.

If you try and run a VBScript macro which creates an Internet Explorer instance using CreateObject you will get the following error after a delay:

Microsoft VBScript runtime error :429

ActiveX component can’t create object: ‘InternetExplorer.Application’

This problem did not occur with IE6 or IE7.

If you run Macro Scheduler as administrator, or disable UAC everything works fine. To run Macro Scheduler as admin right click on the Macro Scheduler icon and select “Run as administrator”.

I have emailed the IE team at Microsoft to find out if there is any better solution. I will let you know what they say.


Update: No news from Microsoft but after lots of experimentation we discovered some very surprising things which don’t really make any sense, but have enabled us to make some changes in order to solve the problem. The next Macro Scheduler update will therefore have the above issues fixed.

March 23, 2009

It’s time to bring down IE6!

Filed under: General,Web/Tech — Marcus Tettmar @ 12:12 pm

Bring Down IE6

Some of you may remember that we had some issues with Internet Explorer 6 support when we released our new web site. I made some negative comments about IE6. And I was being polite. Unfortunately IE6 is still in use in millions of companies and, as I mentioned in that last post, some 35% of our web traffic is delivered by people using IE6. If it were up to me I’d banish it to web browser hell.

So I’m all for a new campaign from .Net magazine: Bring Down IE6.

If you have the power to do so, upgrade now, or try out Firefox or Google Chrome . If you’re working for a company that locks down their PCs and forces you to use IE6, get vocal – educate your colleagues and IT department. Petition them to lift you out of the dark ages! 🙂

Check out the site to see how you can get involved.

March 4, 2009

Macro Scheduler Video Trailer

Filed under: General — Marcus Tettmar @ 10:00 am

You’ve seen film trailers, now there are software trailers. Here’s a 30 second Macro Scheduler Trailer courtesy of Tucows.com:

February 5, 2009

Twitter – What, Why, How?

Filed under: General,Web/Tech — Marcus Tettmar @ 2:20 pm

If you’re one of those who has heard of Twitter but just doesn’t quite “get it” yet you should find Scott Hanselman’s How To Twitter – First Steps and a Twitter Glossary useful. It explains what Twitter is, why it’s useful and how to tweet.

I didn’t get it at first. I wasn’t quite sure what I would get out of it. Most people who now use Twitter regularly were probably the same to begin with. Now I realise how useful it is. I follow friends, people and companies that I find interesting and I want to stay up to date with. I follow news sites like the BBC and CNN. I probably get most of my news via Twitter now (In our house the TV seems to be permanently tuned to Nick Jr these days!). Most of the bloggers I read now tweet their blog updates, so I no longer need to monitor their RSS feeds.

It’s useful. It’s fun too. Even if you don’t have anything to say, you can get a lot out of following people that interest you. And, as Scott says, the nice thing is if you want to respond you can just jump in and reply to anyone.

So if you’ve been wondering what all the fuss is about, read Scott’s blog post, jump in and join the conversation. You can start by following me. My twitter ID is http://twitter.com/marcustettmar 🙂

January 29, 2009

We Eat Our Own Dogfood

Filed under: General — Marcus Tettmar @ 3:54 pm

I just read this post on the Coding Horror blog and it struck a chord:

In software circles, dogfooding refers to the practice of using your own products. It was apparently popularized by Microsoft:

The idea originated in television commercials for Alpo brand dog food; actor Lorne Greene would tout the benefits of the dog food, and then would say it’s so good that he feeds it to his own dogs. In 1988, Microsoft manager Paul Maritz sent Brian Valentine, test manager for Microsoft LAN Manager, an email titled “Eating our own Dogfood” challenging him to increase internal usage of the product. 

We certainly eat our own dogfood here at MJT Net Ltd. Macro Scheduler was written to solve a pain I had at a previous job many years ago, and I still use it day in day out. Not only is it used for automating various business processes within the company, it is also used for creating small tools and for building parts of other projects.

But what struck me most about the coding horror article was this SawStop video:

It’s an impressive video. Perhaps the reason it struck a chord with me is that my father is a very keen woodworker and has a workshop full of very dangerous machinery which makes me wince every time I step inside. For some reason all I can think of when I watch him work is which limb is going to fly off first!

The creator actually did stick his own finger in a SawStop on camera, apparently on the Discovery Channel show Time Warp, but I can’t locate any web video of it.

Now, THAT is eating your own dogfood!

January 27, 2009

Modal vs Non-Modal – Windows, Not Jazz

Filed under: Automation,General,Scripting — Marcus Tettmar @ 11:07 am

Every now and then, in the forums and in emails to us, there seems to be some confusion over what these terms mean.  As a developer I take these terms for granted, but anyone else, depending on their walk of life, might think they refer to some kind of Modal Jazz; something to do with a modal matrix used in linear algebra; or a type of auxiliary verb used to indicate modality.  

I sometimes need to remind myself that not everyone coming to Macro Scheduler and Windows Automation in general are familiar with geeky software terms.  I can’t tell you much about modal jazz, linear algebra or auxiliary verbs, but I can do my best to set to rest any confusion about Modal and Non-Modal windows.

Modal Windows

When a window is modal it remains active and focused until the user has finished with it and dismisses it.  While it is active no other windows of the same application can be activated.  A modal window is therefore normally a child window.  The user needs to interract with it before control can be returned to the parent application. In effect the parent application is locked and nothing proceeds until the modal window is closed.

You’ll find a good definition of Modal Windows on Wikipedia, here.

Non-Modal Windows

So a non-modal window is the opposite. While it is active you can still activate other windows. The user can switch between windows of the same application. The window being active does not prevent the rest of the application from continuing.

Modal Dialogs

In Macro Scheduler you can create custom dialogs. These can be modal or non-modal to the script. When we refer to a modal dialog what we mean is that once the dialog is displayed, the script halts until the user closes the dialog. Script execution is paused until the dialog is dismissed. The script cannot do any processing while the modal dialog is active. A modal dialog is displayed with the Show command, with a return variable specified, in which the “modal result” of the dialog is reported, corresponding to which button was pressed to close the dialog.

Non-Modal Dialogs

A dialog can be made to be non-modal. In which case the script carries on even after it has displayed the dialog. The user can interact with the dialog while the script continues to perform other tasks. The developer would need to write code to retrieve the state of the dialog and the data that has been entered into it. Usually this would need to take place in a loop. A non-modal dialog is displayed with the Show command, with the return variable omitted. Inside the loop we would retrieve the state and data of the dialog with the GetDialogAction command, and set it with ResetDialogAction.

In this post I have concentrated on definitions rather than going into detail on how you can create and control custom dialogs. That is a subject for another post and you will find more information in the help file and online help. Some dialog examples ship with Macro Scheduler and you’ll find more in the forums.

« Newer PostsOlder Posts »