Hi again. I am new to Macro...
Can I use Macro Scheduler to run a suite of tests. For example, have a main script that will call many other scripts, using the ExecuteFile maybe. I tried but it did not work well and therefore I am posting this question. If you know of a way then please elaborate on the following:
1. Will the variables (system or user defined) from the main script be available to the called scripts and vice versa?
2. How does the main script know to wait for the called script to finish before it continues execution?
3. Any other hints and tricks are welcomed. And if you can point me to help on the above, I could not find any.
If Macro Scheduler does not offer that then how do you go around it? I do not want to have one giant script to do all kinds of things.
Appreciated,
Raymond
Can I Run a suite of tests in Macro Sched?
Moderators: JRL, Dorian (MJT support)
In my experience, you won't find much that Macro Scheduler doesn't offer.
Here are the primary functions that would be used to call a secondary script. Look each of these up in help for more info. Then ask some more pointed questions. You can actually paste the following into the editor, place the cursor on any of the lines then press F1 to get help for that particular function.
Here are the primary functions that would be used to call a secondary script. Look each of these up in help for more info. Then ask some more pointed questions. You can actually paste the following into the editor, place the cursor on any of the lines then press F1 to get help for that particular function.
Code: Select all
Macro>Path\Scriptname.scp
Include>Path\ScriptName.scp
RunProgram>Path\msched.exe Path\ScriptName.scp
ExecuteFile>Path\ScriptName.scp
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Yes, if you use the Include> command. No if you call it via the Macro> command. Please see Include and Macro in the help file.1. Will the variables (system or user defined) from the main script be available to the called scripts and vice versa?
Include literally includes the script inside the main script so all variables etc are shared. Macro calls it but it runs separately, so variables are not shared although you can pass variables on the command line as needed.
For more information on Include see:
http://www.mjtnet.com/blog/2009/09/09/i ... ary-files/
Using Include or Macro the "calling" script will always wait for the called script to complete.[/quote]2. How does the main script know to wait for the called script to finish before it continues execution?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Hi rsamour,
If you will be compiling your scripts, you might find the info in this post useful...
Include function and compiling
In a nutshell, currently when we compile a script, we can choose a checkbox called "Compile Includes". If you check it then...
"Scripts referenced by Include> statements will be embedded and compiled into the Exe."
If you don't check it, then the includes will be resolved at runtime... i.e. the scripts referenced by Include> statements must be available and in the proper directories on the machine that is running your compiled macro.
Right now, its all or nothing, either you check the box or you don't and all Includes are affected in the same way. The post at the link above introduces an idea for a possible future enhancement... where we could individually designate each Include to resolve at compile time or at run time.
Take care
If you will be compiling your scripts, you might find the info in this post useful...
Include function and compiling
In a nutshell, currently when we compile a script, we can choose a checkbox called "Compile Includes". If you check it then...
"Scripts referenced by Include> statements will be embedded and compiled into the Exe."
If you don't check it, then the includes will be resolved at runtime... i.e. the scripts referenced by Include> statements must be available and in the proper directories on the machine that is running your compiled macro.
Right now, its all or nothing, either you check the box or you don't and all Includes are affected in the same way. The post at the link above introduces an idea for a possible future enhancement... where we could individually designate each Include to resolve at compile time or at run time.
Take care
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
