Can I Run a suite of tests in Macro Sched?

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
rsamour
Newbie
Posts: 8
Joined: Tue Sep 29, 2009 7:54 pm

Can I Run a suite of tests in Macro Sched?

Post by rsamour » Wed Sep 30, 2009 7:27 pm

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

User avatar
JRL
Automation Wizard
Posts: 3529
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Sep 30, 2009 8:04 pm

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.

Code: Select all

Macro>Path\Scriptname.scp
Include>Path\ScriptName.scp
RunProgram>Path\msched.exe Path\ScriptName.scp
ExecuteFile>Path\ScriptName.scp

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

Post by Marcus Tettmar » Thu Oct 01, 2009 8:06 am

1. Will the variables (system or user defined) from the main script be available to the called scripts and vice versa?
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.

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/
2. How does the main script know to wait for the called script to finish before it continues execution?
Using Include or Macro the "calling" script will always wait for the called script to complete.[/quote]
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Thu Oct 01, 2009 4:18 pm

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
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 - :-)

rsamour
Newbie
Posts: 8
Joined: Tue Sep 29, 2009 7:54 pm

Post by rsamour » Thu Oct 01, 2009 7:49 pm

Guys, many thanks for the help.

Cheers,
Raymond

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