Greetings! I would like to run a very long macro which, after running a few minutes, would call a second macro and then wait for a window having DONE as the first four letters of the window name. This would be done by using the instruction:
WaitWindowOpen>DONE*
The second macro which would run concurrently with the first macro would open either of two windows depending on conditions and then exit. The first window is named DONE1, and the second window is named DONE2.
The first macro would then use the IfWindowOpen instruction to determine whether the second macro had opened Window DONE1 or window DONE2 as follows:
[code]
IfWindowOpen>DONE1
Press Esc // Close Window
(First set of logic)
Else
Press Esc // Close Window
(Second set of logic)
Endif
[/code]
Is there any way to have 2 Macro Scheduler macros run concurrently instead of sequentially?
Thanks in advance for your help.
Running 2 Macro Schedule Macros concurrently
Moderators: JRL, Dorian (MJT support)
-
- Pro Scripter
- Posts: 56
- Joined: Sun May 11, 2008 9:39 pm
Running 2 Macro Schedule Macros concurrently
May you have a blessed day!
Michael D Fitzpatrick
Reg. US Patent Agent
Michael D Fitzpatrick
Reg. US Patent Agent
I posted the Happy Button script primarily to demonstrate a way to do what you are asking. The Happy Button script will call and run a secondary script whether or not the calling script is compiled or uncompiled.
The task is easier if the calling script is not compiled. When the calling script is not compiled, you can call and run a second (or third or fourth etc.) script three different ways.
- Using the Macro> function which will pause the calling script until the called script is completed and ends.
- By using the Run Program> function which will pause or not pause the calling script depending upon the value of the RP_WAIT system variable. If RP_WAIT is set to 0 (zero) the calling script and the called script will run concurrently. If RP_WAIT is set to 1 (one) the effect will be the same as using the Macro> function.
- Using the ExecuteFile> function will call and run a script assuming the .scp extension has been associated with Macro Scheduler. The calling script and the called script will run concurrently.
Hope this answers your question.
The task is easier if the calling script is not compiled. When the calling script is not compiled, you can call and run a second (or third or fourth etc.) script three different ways.
- Using the Macro> function which will pause the calling script until the called script is completed and ends.
- By using the Run Program> function which will pause or not pause the calling script depending upon the value of the RP_WAIT system variable. If RP_WAIT is set to 0 (zero) the calling script and the called script will run concurrently. If RP_WAIT is set to 1 (one) the effect will be the same as using the Macro> function.
- Using the ExecuteFile> function will call and run a script assuming the .scp extension has been associated with Macro Scheduler. The calling script and the called script will run concurrently.
Hope this answers your question.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact: