May 10, 2006

Macro Scheduler 8.0.2 Update

Filed under: Announcements — Marcus Tettmar @ 8:40 am

We have released Macro Scheduler 8.0.2 Maintenance Release. For more information see:

http://www.mjtnet.com/usergroup/viewtopic.php?t=2879

As well as some small bug fixes this release has been prepared for Vista and has been tested under Vista beta 2. Please note however that we do not yet officially support Vista as it is still a beta product. Also note that AutoLogon is not supported in Vista at this time.

May 9, 2006

Instant Directory Assistance

Filed under: General — Marcus Tettmar @ 8:12 pm

Here’s a novel use for Macro Scheduler. TeleQuery have released an inexpensive new tool, powered by Macro Scheduler and msNet, which does instant directory look-ups in the USA, and it doesn’t matter where you are in the world. This tool uses the most up to date and reliable telephone company databases to return the actual Directory Assistance listings for only $0.50. It lets you find telephone numbers based on full or partial name and address searches and will even do reverse look-ups – give it a telephone number and it will return the address.

TeleQuery Directory Assistance

Not only is this tool a time and money saver for anyone who needs to perform Directory Assistance queries but it also demonstrates the power and flexibility of Macro Scheduler and msNet for GUI and network tasks.

For more information Click Here or contact:

TeleQuery.Net, Inc.

Phone: 214-946-5116 – 8am-10pm Mon-Sun (Central Daylight Time)
Toll-free: 1-877-225-7827 – 8am-10pm Mon-Sun

Email: [email protected]
Web: http://www.telequery.net/

WebRecorder 1.72 Update

Filed under: Announcements — Marcus Tettmar @ 7:55 am

We have today made available WebRecorder 1.72 which adds the ability to hide and/or show Internet Explorer windows. IEAuto.DLL now includes the ShowIE function which lets you set the IE window to visible or invisible. This now means you can create WebRecorder scripts that automate IE transparently “behind the scenes” with invisible IE windows.

http://www.mjtnet.com/webrecorder.htm

May 2, 2006

Changing CMD’s Window Title

Filed under: Automation, Scripting — Marcus Tettmar @ 3:28 pm

When running command line tools, applications or batch files it is often necessary to watch the resultant command window. E.g. to detect their completion you can have the script wait until the command window has closed. The trouble with this is that when you run batch files the title of the command window is always just “C:\WINDOWS\system32\cmd.exe”. So if your script starts more than one batch file, or you have other CMD windows open, how do you know which CMD window is which?

Well how about predefining the window title of the new CMD window? We can do this with the Windows start command. The start command starts a new CMD window and lets you give it any title you want and run a program/command at the same time. For more info type start /? at the command prompt. So we can use this in Macro Scheduler with the Run Program command:

Run Program>cmd /c start "Window Title" "c:\bla\something.bat"

This enables us to monitor this specific window to see when the batch file completes:

Run Program>cmd /c start "My Window One" "c:\stuff\reports.bat"
WaitWindowOpen>My Window One*
WaitWindowClosed>My Window Two*
MessageModal>Finished!

Now you might be wondering why we’d want to do the above when you can just make the script wait for the program or command run to finish by setting RP_WAIT to 1, like this:

Let>RP_WAIT=1
Run Program>c:\stuff\reports.bat

Well, you may need to manipulate the window at some point during the process. Or you might want the script to detect if the batch file is taking too long to complete, like this:

Run>cmd /c start "My Window" "d:\test.bat"
WaitWindowOpen>My Window*
Let>WW_TIMEOUT=120
WaitWindowClosed>My Window*
If>WW_RESULT=FALSE
  //Timed out, email Administrator
  SMTPSendMail>[email protected],..........
Endif

Using the start command like this to set the CMD window’s title makes it much easier to distinguish between other command windows and ensure we manipulate the one belonging to our batch file.

April 28, 2006

Tight Loops

Filed under: Scripting — Marcus Tettmar @ 8:15 am

Tight loops consume CPU cycles. A tight loop that doesn’t yield to the processor will hog the processor and can prevent other processes getting the CPU and can therefore slow down your system. Consider this simple loop:

Let>x=1
Label>start
  Let>x=x+1
Goto>start

Run that and you’ll notice CPU utilisation for Macro Scheduler will jump up to around 99%. Now force the loop to yield to the processor with a tiny Wait statement:

Let>x=1
Label>start
  Let>x=x+1
  Wait>0.05
Goto>start

The difference is dramatic. CPU utilisation in Task Manager will now be next to zero.

The Wait statement delays the current process (the script) and allows other processes to get resource. It is basically allowing the processor to time slice. Without it the processor never gets a chance to do anything else.

So, always add a small Wait statement into a tight loop. If your loop doesn’t already perform any kind of Wait then add Wait>0.05 and it will improve performance immensely.

And I should listen more to my own advice! I’ve just noticed that the Calculator sample script doesn’t have a Wait in the main ActionLoop and chews up resources. Following my own advice I’ve added a Wait>0.05 and CPU utilisation drops to near zero. I’ll make sure this sample script is fixed in the next Macro Scheduler maintenance release and add some notes to the documentation under the Goto/Label and Repeat/Until topics.

April 26, 2006

System Error Codes

Filed under: General, Scripting — Marcus Tettmar @ 10:31 am

Someone asked recently how to get information on what certain error codes mean. Most of the error codes returned by Macro Scheduler functions are actually standard Windows return codes. E.g. the result of a WriteLn or ReadLn operation or the Run Program command is a standard Windows error code.

Windows System Error codes are documented in the Win32 SDK documentation and can also be found on Microsoft’s site here.

I’ve also posted this link in Scripts & Tips.

April 25, 2006

French Language Pack Available

Filed under: Announcements, General — Marcus Tettmar @ 9:18 am

Many thanks to Christophe Faure for translating Macro Scheduler into French. He has completed the program language file and the help file is about 40% complete. The French language pack can be downloaded here.

If any French users of Macro Scheduler discover a French download site that does not currently list Macro Scheduler could you let us know?

April 24, 2006

Multiple Monitors

Filed under: General — Marcus Tettmar @ 8:58 am

Dave Collins writes that the New York Times reports a 30% increase in productivity when users run multiple monitors. He also links to an interesting discussion touting 36 screen setups and some photos of other big multi-screen configurations.

A few months ago I discovered an excellent piece of software called MaxiVista. MaxiVista lets you use a second PC’s screen as a secondary monitor. It is ideal if you have an old laptop. You can sit the laptop next to your primary monitor and, via the network, the laptop becomes a second screen.

MaxiVista also lets you switch from secondary display mode to remote control mode. Now just by moving your mouse from one screen to the next you can control the other PC. It is really quite cool and very handy. As it happens I have two PCs that I use regularly and I used to switch between them using a KVM switch. Now, with an old 17 inch monitor on the other PC and MaxiVista installed, I run my main PC in dual-screen mode and when I want to use the other machine I just switch to remote control mode and move the mouse across to the second screen. I can switch between PCs just by moving the mouse from one screen to the other. It really is very slick. Check it out at maxivista.com.

April 18, 2006

Voicemail Problems

Filed under: General — Marcus Tettmar @ 5:33 am

We seem to be having some problems with our voicemail system at the moment. Messages are being truncated. If you’ve left a voicemail for us during the last week or so and haven’t heard back from us that will be the reason. If so please send us an email with your contact details and we’ll get back to you right away.

Update 20/04/06 – Problem solved!