Category: Scripting

Slow Mouse Move

January 18, 2011 by Marcus Tettmar in Scripting

A support request came in today asking how to show the mouse moving from one point to another slowly enough to be visible in a video demo. The regular MouseMove function simply “jumps” the mouse cursor straight to the given point, without passing any points between wherever it was to start with and that end […]

Read more »

Mixing the Native Excel Functions with VBScript

December 15, 2010 by Marcus Tettmar in Automation, Scripting

Macro Scheduler comes complete with some native functions for controlling Excel, such as XLOpen, XLGetCell, XLSetCell and others. Obviously, although we intend to add more functions over time, not every possible Excel function has been duplicated. So sometimes you may want to utilise COM via VBScript which allows you to access the entire Excel API. […]

Read more »

Creating Native Function Aliases for Win32 Functions

November 15, 2010 by Marcus Tettmar in General, Scripting

The other day I posted a response on the forums which uses LibFunc to run the Win32 API function GetKeyState. This prompted someone to email me the following: I didn’t know the Win API call to check for a key being down. The API call works but have you considered adding a native MS command […]

Read more »

Waiting for the Clipboard

November 2, 2010 by Marcus Tettmar in Automation, Scripting

Today I was helping someone who was wanting to write a script to take screen-shots from one application and then paste those screen-shots into Microsoft Excel. Initially things weren’t working reliably because the script didn’t factor in the time taken for the large bitmap of a screen-shot to exist in the clipboard after pressing the […]

Read more »

Display an Animated GIF on a Dialog

October 15, 2010 by Marcus Tettmar in Scripting

Forum regular JRL has come up with yet another great coding example, with a demonstration of how to jazz up your dialogs by displaying an animated image – a great way to represent progress of an activity. Here it is. In fact this example shows how any window can be embedded into a dialog by […]

Read more »

Making a Dialog or Window Stay On Top

September 16, 2010 by Marcus Tettmar in Automation, Scripting

Edit: 23 March 2011. In Version 12 it is possible to make a dialog stay on top simply by setting the dialog’s FormStyle property to fsStayOnTop. The method outlined in this post is not necessary for v12 dialogs but will remain as it can be used for older versions and the same approach can be […]

Read more »

Trigger Scripts

September 8, 2010 by Marcus Tettmar in Automation, Scripting

Macro Scheduler has a number of scheduling features to allow you to specify when a macro should fire. One of these mechanisms is called a Trigger. There are several trigger types: Window Event File Event Folder Event Custom Event A Window Event can be set to fire when a specified window appears or disappears. Similarly […]

Read more »

Don’t Overwhelm your Target!

August 24, 2010 by Marcus Tettmar in Automation, Scripting

When sending keystrokes to other applications remember that Macro Scheduler works much faster than a human being can type. Many applications do form field verification or background processing on the fly as the text is received. And most applications were designed on the assumption that a human being would be operating them. It may not […]

Read more »

Launching URLs in Default Browser (and a small bug!)

July 14, 2010 by Marcus Tettmar in Automation, Scripting

A quick and easy way to launch a URL in the default web browser is just to use the ExecuteFile command: ExecuteFile>http://www.mjtnet.com/ However, I have recently discovered that ExecuteFile is currently limited to a command line length of MAX_PATH (260 chars) and that if more than 260 chars are passed it will cause Macro Scheduler […]

Read more »