Creating a Scheduled Macro

 

This page demonstrates creating a Scheduled Macro, one that plays back on a schedule. To start, click on the New Macro icon from the Macro Express Pro - Explorer window to open the Create New Macro window.

 

 

Setting the Schedule
 

1.Select Schedule from the Activation list to display the scheduling options.

2.For this example select the "When a Specified Time has Elapsed" from the Run the Macro drop down menu.

3.In the Schedule tab, select 0 hours, 0 minutes and 15 seconds.

4.Click on the Range tab.

5.Select the Play Macro Indefinitely option from the drop down list.

6.Leave the "Start calculating the next runtime at" fields alone. Check to make sure the time listed is not later than the time on the computer clock. Make sure that the date displays today's date.

7.Leave the "Run the macro between these hours of the day" option not checked.

8.Leave every day of the week selected.

9.Enter "Display the Time" as the macro nickname.

10.Click the OK button to open the Script Editor.

 

 Based on the schedule just set, the macro will run every 15 seconds.

 

 

Setting the Program Scope

We'll create this macro to only play back in the Notepad window and only if it is already running.

 

1.Click on the Scope tab and select Window/Program Specific.

2.Click on the Add Window button to open the Select Window dialog.

3.Click on the Visible tab and enter "notepad" (without the quotes) in the Window Title edit field.

4.Select Partial Match from the drop down list.

5.Leave the option "A window with this title must be on top" unchecked.

6.Click OK to save the Scope information.

 

 

Building the Macro

 

1.Click on the Script tab to start writing the macro.

2.To begin, expand the Windows/Programs category of commands. 

3.Double click on the Window Activate command.

4.Enter "notepad" (without the quotes) for the Window Title and click on the OK button.

5.Select Partial Match from the drop down list and click OK to save the information and insert into the macro script.

6.Expand the Variables category of commands. 

7.Double click on Date/Time to open the Date/Time window.

8.In the Date/Time tab, make sure the "Set it to the current date/time" option is selected.

9.Click on the Operation tab.

10.Select the "Type the Date/Time stamp out" option.

11.Enter "h:mm:ss" (without the quotes) in the Choose a Date/Time Format edit box.

12.Click OK to save the changes.

 

üNote: There should be two lines of script displayed in the Script Editor. Double click on either of these entries to make changes.

 

13.From the Script Editor, click on the Save and Close button.

14.Open the Macro Explorer window to see your newly defined macro, Display the Time, added to the list of available macros.

 

 

Playing back the Macro

As long as Macro Express is running, a timed macro should be ready to execute. However, in this example the timed macro will only execute if Notepad is running. 

 

1.To test the macro, run the Notepad program.

2.Once Notepad is running, just wait.

3.The time is typed into Notepad every 15 seconds.

 

 

Disabling the Macro

After verifying that the macro works, either delete or disable this macro since you won't want this Scheduled Macro to continue executing every 15 seconds indefinitely! To delete the macro, highlight the macro in the Macro Explorer list and choose "Macros > Remove Macro" from the menu.

 

To keep this example around, but not to play back every 15 seconds, right mouse click on the macro. Left click on Disable to disable the macro. The macro is now displayed in the Explorer window with italicized red font and possibly a line drawn through it, depending on Preference settings. This quickly alerts that the macro is disabled and will not play back until it is enabled.