|
Creating Scripts |
Top Previous Next |
|
To create a new script select 'File/New Macro', or click the 'New' button on the Toolbar. To Edit an existing script, select it from the list by clicking on it and then select 'File/Macro Properties' or double click on it. Having done this you will be presented with the following window:
In this example an existing script was selected to be edited. If 'New' had been pressed then this form would appear blank.
Code can be inserted and edited directly into the script editor. Use the Command Locator to quickly find a function to insert. Pressing F1 in the editor will present the help topic for the highlighted function or, if no text is highlighted, the function in the current line. To test the script click the 'Run' button.
To save the macro press the Save toolbar button. If you have not yet given the macro a name you will be asked for one. Press Save to save any changes made to the macro script or properties.
The script editor provides a full featured programmer's editor with code folding, bookmarks, the Debugger and other script building options including the Dialog Designer and Code Snippets. See also Code Folding and Bookmarks.
The Import button allows you to load in a script that has already been created. This is useful if you have a number of Macro Scheduler installations and want to make use of a script created on a different PC for example.
The numbers at the top right of this window show your mouse cursor position. Use these to determine the correct parameters when using the MouseMove command. The button to the left of the numbers reveals a drop down menu which allows you to toggle between absolute coordinates and relative coordinates. When set to relative, the numbers show you the relative coordinates to the window the cursor moves over. The other option allows you to attach a small tag to the mouse cursor that shows the coordinates and follows the cursor around. This means that if the script window becomes concealed by another application you can still see the cursor position. The last option of the drop down menu is used to add the pixel colour to the display as well as the cursor position. This is helpful for the WaitPixelColor command.
For help with other tabs of this window see: Scheduling Scripts (Run When), Trigger, AutoLogon, Logging, Encryption, Hot Keys, Groups
To get help with the MacroScript language see: Scripting Windows for Beginners, Command Reference, Using Variables, Complex Expressions |