ejs Posted January 11, 2008 Report Share Posted January 11, 2008 According to the macro express help file, Macro Return is used in conjunction with Macro Run. Macro A calls Macro B; use Macro Return in condition logic within Macro B to prematurely stop Macro B and return play back to Macro A. In contrast, if Macro Stop is used in the condition logic in Macro B, the entire macro play back will stop. Macro B will stop but so will Macro A. What if I want to have Macro B work as follows: (i) if I run Macro B by activating Macro B directly (that is, not called by a Macro Run command from Macro A), and if Macro B satisfies my condition, then Macro B stops (ii) if I run Macro B via a Macro Run command from Macro A, and if Macro B satisfies my condition, then Macro B stops and Macro A continues. Case ii can use the Macro Return statement to stop B and return control to A. but I need a single approach that will work for case (i) AND (ii). Can I still use Macro Return? If playback encounters Macro Return in a macro which was activated directly, does Macro Return do the same thing as Macro Stop. This is not covered by the macro express help. I gave it a try and it seems to work, but I wanted to ask this forum if I'm not overlooking any interactions and whether there is a better solution. Quote Link to comment Share on other sites More sharing options...
Cory Posted January 11, 2008 Report Share Posted January 11, 2008 I’m not sure about how it would work without doing some experiments and trying as you have already done so I can’t speak to that with any authority but if for some reason that doesn’t work why don’t you just use a variable. If the parent macro sets T99 to “This came from a macro” and when you do the “Macro Run” you could use the logic If T99 = “This came from a macro” then you know if it was executed by itself or called. I'll be interested to hear what you find on your basic question though. Quote Link to comment Share on other sites More sharing options...
kevin Posted January 11, 2008 Report Share Posted January 11, 2008 What if I want to have Macro B work as follows:(i) if I run Macro B by activating Macro B directly (that is, not called by a Macro Run command from Macro A), and if Macro B satisfies my condition, then Macro B stops (ii) if I run Macro B via a Macro Run command from Macro A, and if Macro B satisfies my condition, then Macro B stops and Macro A continues. Case ii can use the Macro Return statement to stop B and return control to A. but I need a single approach that will work for case (i) AND (ii). Can I still use Macro Return? If playback encounters Macro Return in a macro which was activated directly, does Macro Return do the same thing as Macro Stop Yes, you can use Macro Return in Macro B and it will work the way you describe. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.