Tutorial - Scheduled Macro


This page will demonstrate creating a scheduled macro, one that will play back on the schedule that you choose. From the Macro Express Explorer menu click on Macros | Add Macro. The Add Macro window should appear.

 

 

Select the Schedule activation to display the scheduling options. For this example select the Other option in the Run Macro section. For simplicity in our example, check the box next to the Play Macro Indefinitely option. In the Other section, select every 1 minutes and 0 seconds. With the settings we have selected, the macro will play back every minute.

 

We can choose to create the macro by using the Direct Editor or the Scripting Editor. For this exercise click on the Scripting Editor button. Clicking on the Scripting Editor button will activate the Scripting Editor pane.  

 

 

First, click on the Properties tab. In the Nickname box, enter "Date and Time". Then click on the Scope tab and make sure that Global is checked. Now click on the Scripting tab.

 

We'll create this macro to only play back in the Notepad window and only if it is already running. To begin, click on the Windows/Programs command to expand this category. Then double click on the Window Activate command to bring up the Activate/Launch Program window. Make sure the Activate Window Only option is selected.

 

 

Enter notepad for the Window Title and click on the OK button. This command will be inserted into the macro script. Then click on the Text command to expand this option. Double click on Date to open the Select a Date Format window.

 

 

Choose one of the date formats and then check the Show Leading Zeros option.  Make sure the Type Out option is selected and click on the OK button to save your entry and return to the Scripting Editor. Then double click on the Text Type option from the Text category to load the Text Type window.

 

 

Locate Space in the yellowed area and click on it. This will insert <SPACE> into the keystrokes field and will instruct the macro to insert a space between the date and time during playback. We will add the time next. Click OK to return to the Scripting Editor. Locate the Text command again and double click on the Time option to open the Select a Time Format window.

 

 

Choose one of the time formats and then check the Show Leading Zeros option. Make sure the Type Out option is selected and click on the OK button to save your entry and return to the Scripting Editor. Locate the Text command again and double click on the Text Type option to open the Text Type window.  

 

 

 

We want to have the enter key pressed after the time is displayed so that each entry will start on a fresh new line. Click on the Enter option located in the yellow area. This will insert <ENTER> into the Keystrokes field. Then click on the OK button to save the entry and return to the Scripting Editor.  

 

You should have five entries listed in the "Macro Script" area as shown in the Scripting Editor image above. You can double click on any of these entries to make changes to what was input earlier.   

 

From the Scripting Editor, click on File | Save to save your macro. Click on the Macro Explorer button to see your newly defined macro, Date and Time, added to the list of available macros.

 

As long as Macro Express is running, a timed macro should be ready to execute. However, in our example the timed macro will only execute if Notepad is running.  To test the macro, run the Notepad program. (To run Notepad, click on Start | Run from the bottom left of the computer screen, enter "notepad" and click the OK button.) Once Notepad is running, just wait. The date and time should type into Notepad every minute.

 

After you are satisfied that it works, you can either delete or disable this macro since you won't want this Scheduled Macro to continue executing every minute indefinitely! To delete the macro, highlight the macro in the Macro Explorer list and choose "Macros | Remove Macro" from the menu. If you wish to keep this example around, but do not want it playing back every minute, then right mouse click on the macro. From the menu that appears, you will notice that the entry for this macro will now be italicized and in a lighter color. This means it is disabled and will not play back until you enable the macro.