I have a macro that pops up a dialog box every 15 minutes. I’d like to set the macro to not run again if the dialog is present. I’ve tried setting a “dialog is active” type variable, but it’s a complex macro and there’s ways to cancel it out that seem to prevent it from having the opportunity to reset that variable.
Is there any way to put an “if” condition to test whether the macro in question is actively running?
Follow-up question… When I use Semaphore Lock, it properly prevents multiple executions of the macro, but when I unlock the semaphore, the macro “catches up” on missed actions. For a frequent timed macro, this can result in my having a stream of new dialogs created and I have to dismiss all of them. Any ideas on how to prevent this from happening?
Not seen this so I can’t really say.
One thought maybe, at the end, just before the last step (the unlock), do a ‘cancel this macro’, if that just cancels the one instance then it won’t help, but if it cancels all instances of that one macro then it might work?
There’s a ‘cancel this macro’ and a ‘cancel just this macro’, so maybe the first one would cancel all instances of the one macro and the second just a single instance? Just looked in the manual and it doesn’t seem to discuss these. Worth a try.
You could use Cancel All Macros at the end of your macro.
Or for most cases, you could set a very short timeout on the Semaphore Lock, and include a Pause in the macro before (implicitly or explicitly) unlocking it at the end - you’ll still get a repeat of any very recently triggered macros.