Jump to content
Macro Express Forums

Specify sequence of startup macros


ejs
 Share

Recommended Posts

I would like to create several macros that would be scheduled to run every day at startup of macro express. My problem is that there may be dependencies between them, such that I need them to be run in a specific order.

 

If I set each macro to have its own schedule for it to run at startup, I don't think there's any way for me to control the sequence and ensure that the macros are run in the correct order.

 

Alternately, I could set each macro not to have any activation, and I could create a new "master" macro. The master macro uses the Macro Run command to call each of my macros in the sequence I specify, and I can set this master macro to run at startup. PROBLEM: if any macro encounters an error, none of the subsequent macros will be attempted (that is, if Macro A calls Macro B and Macro B fails, play back is not returned to Macro A... this is normal macro express behavior). I need all the macros to run, regardless of whether any individual Macro fails (I can put in my own commands for how a macro should behave if an earlier, dependent Macro failed.)

 

As far as I can tell, macro express will allow me to do either BUT NOT BOTH of the following:

 

- I can ensure that every macro runs (regardless of failures of other macros) by giving each macro its own startup schedule, but then I have no control over the sequence in which the start of macros are run

 

- I can control the sequence, but then the entire sequence stops if one macro encounters an error

 

Any suggestions for how I can have the best of both worlds?

Link to comment
Share on other sites

Just some quick thoughts:

 

I would have each macro scheduled to fire not at startup but at a specific time, maybe 1 or 2 minutes apart. Startup would mean to fire on a reboot also.

 

Do not use the Macro Run command to string them together. Not in this case. Not for unattended automation unless the called macro is doing something that you know will never throw an error.

 

Use a dedicated folder/file, or use the Registry, or use the message log itself to have each macro record its state. If successful, have it write something to one of the above destinations. Your other macros can read these states to determine what, if anything they should do. If nothing is written then the macro threw an error.

 

Turn off the error display by using the Log Errors command. It will stop the macro without a dialog so another macro can fire. How to is shown in the command's help file.

 

You could have your macros continue firing until all work is done. Again, use an output message to communicate states to the other macros. If a macro is finished with its task, use the Macro Disable command so it does not run again.

Link to comment
Share on other sites

Here is one technique way to do this:

 

Create several Scheduled macros. have then all use a slightly different schedule as Joe suggests. Have one repeat every 20 seconds, another every minute, etc. Inside each macro use the Macro Disable command to disable that macro and use the Log Errors command to log errors instead of waiting with an error prompt.

 

Disable all of these Scheduled macros.

 

Create a Scheduled macro that runs when Macro Express starts. Put a series of Macro Enable commands in it to enable the Scheduled macros mentioned above.

 

 

When Macro Express starts up, all the scheduled macros will be enabled. They will run (one at a time). If an error occurs in one macro, all subsequent macros will still run.

 

This is a clarification of Joe's suggestion.

Link to comment
Share on other sites

Thanks Joe and Kevin. Your suggestions would work and I guess are the only solution in the current version of ME, but it seems like overkill to need to set up the macros in this way. I put in a feature enhancement request on the ME web site for them to add a startup controller to set the sequence of macros scheduled to run at start up. (I guess it would be just as good if ME offered a way to suppress error dialog boxes (as a currently offers) AND offered a new option to allow playback--when a macro encounters an error--to return to the macro that issued the Macro Run command instead of terminating the calling macro. Then I could use my 'Master macro' approach.)

 

By the way, here is the specific example of what I would like to accomplish: I have a common set of variables that I want to be available to all of my macros. I want to set these variable values during startup and save them (this would be done via a macro that is run at startup). Some of the macros which will reference these variables are other macros that are also scheduled to run at startup. Thus, I need a way to make sure that the macro that defines the variable values is the first startup macro to run at startup.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...