Make scheduled macro's wait for other macros to finish

Example scripts and tips (replaces Old Scripts & Tips archive)

Moderators: Dorian (MJT support), JRL, Phil Pendlebury

Post Reply
GlennM
Newbie
Posts: 2
Joined: Wed Oct 14, 2015 12:23 am

Make scheduled macro's wait for other macros to finish

Post by GlennM » Wed Oct 14, 2015 12:58 am

Hi,

I have tried to find the answer in existing forum topics but is hard to find something talking about a specific type of scheduling when basically everything is about scheduling!

I have number of scheduled macros that vary in time to complete. I also have other macros that are dependant on databases completing upload etc. so need to be manually triggered. My intent is to allow users to trigger these over the network using MsNet when required.

Some of the macros require mouse movement and other things that mean I can't have macro's overlapping.
So,

Is there a way that Macro Scheduler can recognise another macro is running and then add other macros run requests to a list to be performed once the current macro (and others on the list ahead of it) has completed?

Appreciate any help.

-Glenn

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Make scheduled macro's wait for other macros to finish

Post by Marcus Tettmar » Wed Oct 14, 2015 10:59 am

One approach is to have your macros set a flag in e.g. an INI file to indicate that they are running. At the end the flag is reset.

Other macros will check this value and if it is set, wait until it is reset before continuing.

Look at EditIniFile and ReadIniFile commands.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

GlennM
Newbie
Posts: 2
Joined: Wed Oct 14, 2015 12:23 am

Re: Make scheduled macro's wait for other macros to finish

Post by GlennM » Wed Oct 14, 2015 10:41 pm

Thanks Marcus,

I'll give that a go. If there are 2 macros waiting to go using this method is there any logic to which one will go first when the running macro has completed?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts