Using the Macro Recorder
Using the Macro Recorder
Macro Scheduler's Macro Recorder is a great way to get started with scripting and allows you to record your first macro quickly. Here we describe how to use the Macro Recorder and how to get the most out of it.
How to use the Macro Recorder
To record a macro select Run/Record, or press the 'Record' Toolbar button (looks like a video camera) on Macro Scheduler's main window. The Macro Recorder will then open and you will be prompted for a name for the macro and recording will commence when Start is pressed.
By default CTRL-ALT-S will terminate the macro recording. You can select an alternative key from the drop down list box if required. SHIFT-ESC (or the shortcut chosen in Options to stop running scripts) will also stop the recording in the same way that it stops playback.
Carry out the tasks you want the Macro Recorder to capture and finally press CTRL-ALT-S (or chosen key) or click on 'Stop' to end the recording.
The new macro will appear in the macro list and can be executed by clicking the 'Run Now' button.
You can modify the playback speed using the slider. This applies a modification to the Wait times between individual events. In many cases, attempting to speed the macro up by reducing these times will actually make the macro less reliable. It is advisable to leave the speed at real time.
The mouse sensitivity setting is used to ignore small mouse movements. Modify the degree of sensitivity by adjusting the slider. The further towards Max, the more sensitive the Macro Recorder is and the smaller the movements that are ignored. By ignoring small mouse movements the Macro Recorder can refine the script where small, unnecessary mouse movements appear between other events which can be combined into one script command. If these small movements are not ignored then the individual events need to be handled separately, so lengthening the script. If in doubt leave it in the default, middle setting.
With the 'Record Window Names and Positions' option selected the Macro Recorder will notice when your actions cause windows to appear and insert code to make sure the macro waits for those windows to appear before continuing. It will also add code to ensure those windows appear in the same positions and with the same dimensions as they appeared when you recorded the macro. This ensures the macro will work correctly each time with your mouse events landing in the right places.
When recording a macro for a specific application, select the application to run. The Macro Recorder will run the application and remember it's name and position and add the necessary commands to the top of the recorded macro to ensure the application is executed, sized and positioned in the same place each time, so ensuring the reliability of the recorded macro.
The last setting - 'Low Level Conversion' - will avoid parsing to result in a script of lower level commands. E.g. an LDown and LUp will be left alone and not merged into an LClick command.
Macro Recorder Recommendations:
- To make a reliable macro we recommend using the "Run this application first" option. The Macro Recorder will then start that application and the generated script will also ensure it is started when the script is run. This is a far more reliable way to start an application than by double clicking on a desktop shortcut icon, for example. Don't record pointless mouse clicks to start an application when the application can be started directly. Let the Macro Recorder start the application and have it generate a script that runs that application specifically before the rest of the macro proceeds.
- Use the "Record Windows Names and Positions" option to make the generated script wait for target windows to appear; and size and position them the same way each time.
- Minimize all windows before recording your macro so that you are starting against a "clean" desktop and to avoid recording window names that are present now but may not be during playback.
- Learn how to write scripts manually. Written macros can be made more efficient, more reliable and more aware. Read the Scripting Windows for Beginners guide in the help file. Or read this.
- Use the Keyboard Wizard when editing/creating scripts and you want to record a keyboard macro sequence. The wizard creates the code for you.
- Use the Mouse Action Wizard when editing/creating scripts and you want to record a mouse macro sequence. This simplifies code creation by creating the code for you.