Jump to content
Macro Express Forums

Interrupting a macro to run another


jaffy1229

Recommended Posts

With ME3, the short answer is No. But depending what you want to accomplish, there's probably something that can be done, maybe neatly, maybe messily. We would need more details, especially on the macro to be interrupted. For example:

 

Do you want to interrupt the first macro temporarily and then have it continue when the second macro ends? Or do you want to simply stop the first macro when the second one runs?

 

Is the first macro being repeated in its entirety, for example by being scheduled every second, or being called over and over again by some other macro? Or is it a REPEAT loop within the macro that runs continuously for a long time?

 

The devil is in the details.

Link to comment
Share on other sites

With ME3, the short answer is No. But depending what you want to accomplish, there's probably something that can be done, maybe neatly, maybe messily. We would need more details, especially on the macro to be interrupted. For example:

 

Do you want to interrupt the first macro temporarily and then have it continue when the second macro ends? Or do you want to simply stop the first macro when the second one runs?

 

Is the first macro being repeated in its entirety, for example by being scheduled every second, or being called over and over again by some other macro? Or is it a REPEAT loop within the macro that runs continuously for a long time?

 

The devil is in the details.

Hi thanks for the reply. I was looking to interrupt the first macro manually so it stops completly and then for the second macro to begin.

 

The first macro is a long repeating loop

 

Thanks for your help

Link to comment
Share on other sites

It's hard to do precisely what you want in ME3, because while the repeating macro is in control, a hotkey to start the second macro will not be recognized. Here are a few approaches that might work:

 

(1) In Macro Explorer, you can select Options / Preferances / Playback and specify an Abort Macro Hotkey combination. That can be used to abort any macro manually during execution. Then use a hotkey to start the second macro. Not ideal, but perhaps adequate....

 

(2) If the repeating loop can run infrequently, say once per second or less often, you could have the ME scheduler run the macro every second (or whatever interval) but remove the repeat loop -- only do the processing once each time the macro runs. In other words, the repetition will be handled by runnning the whole macro over and over, rather than by running it once. You can set up two other macros (started by hotkeys) to enable and disable the primary macro -- any time it has been enabled it will run per the scheduler, any time it has been disabled it will not run at all. The macro that does the disabling can be your second macro -- after disabling macro 1 it can continue with whatever else you want it to do. The difficulty with this approach is that the hotkey to start the disabling macro will only be recognized if it is entered between executions of the scheduled macro, so if your "repetition" macro runs once per second it may be hard to sneak in the hotkey combination at the right time.

 

(3) You could have the primary macro end itself, by checking something during each repetition (like existence of a temporary file) that can be controlled externally independent of ME. Not as elegant but depending what you are trying to accomplish it might be satisfactory.

 

Or convert to ME4 (ME Pro) which I think lets you start a second macro while the first is running.

Link to comment
Share on other sites

It's hard to do precisely what you want in ME3, because while the repeating macro is in control, a hotkey to start the second macro will not be recognized. Here are a few approaches that might work:

 

(1) In Macro Explorer, you can select Options / Preferances / Playback and specify an Abort Macro Hotkey combination. That can be used to abort any macro manually during execution. Then use a hotkey to start the second macro. Not ideal, but perhaps adequate....

 

(2) If the repeating loop can run infrequently, say once per second or less often, you could have the ME scheduler run the macro every second (or whatever interval) but remove the repeat loop -- only do the processing once each time the macro runs. In other words, the repetition will be handled by runnning the whole macro over and over, rather than by running it once. You can set up two other macros (started by hotkeys) to enable and disable the primary macro -- any time it has been enabled it will run per the scheduler, any time it has been disabled it will not run at all. The macro that does the disabling can be your second macro -- after disabling macro 1 it can continue with whatever else you want it to do. The difficulty with this approach is that the hotkey to start the disabling macro will only be recognized if it is entered between executions of the scheduled macro, so if your "repetition" macro runs once per second it may be hard to sneak in the hotkey combination at the right time.

 

(3) You could have the primary macro end itself, by checking something during each repetition (like existence of a temporary file) that can be controlled externally independent of ME. Not as elegant but depending what you are trying to accomplish it might be satisfactory.

 

Or convert to ME4 (ME Pro) which I think lets you start a second macro while the first is running.

 

 

Thanks very much for the suggestions. The second suggestion might work, I have never used the scheduler but I will look into that as I think that is my best bet. Thanks again for your help, its been extremly helpful and much appreciated!

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...
×
×
  • Create New...