How to run scripts one after another

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Chaoticz
Newbie
Posts: 15
Joined: Wed Apr 23, 2003 3:47 pm
Location: Atlanta, GA USA

How to run scripts one after another

Post by Chaoticz » Wed Apr 23, 2003 8:49 pm

I want to be able to run 5 scripts for example. I want them to run in order, one after the other, so that only one is running at any one time.

Is there a way to do this in Macro Scheduler?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Apr 23, 2003 9:23 pm

Just use the Macro> command at the end of each macro.

Note that the newest versions require the full path of the macro filename.
=====================
From the Help:

Macro>file_name [/variable=value|variable [/variable=value|variable] ... ]

Executes another script file. file_name must be a filename of a macro file. For macros that appear in Macro Scheduler's control panel, add '.scp' to the end of the macro name. It is also advisable to specify the full path should the path change during the execution of the calling macro.

To pass values to the macro specify each one after a / character. The variable name given should exist in the script to be run. The value to assign to that variable is specified after the = character.

If the calling macro has a log file the script being called with the Macro command will log to the same log file. You can override this using the /LOGFILE parameter to set a log file for the sub macro.

Abbreviation : Mac

Examples

Macro>Defragment Disk.scp

Macro>C:\MyFolders\MSmacros\MyMoveFile.scp /source=c:\temp\myfile.bat /destination=c:\temp\myfile.bak

====================
Hope this helps.......good luck
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Chaoticz
Newbie
Posts: 15
Joined: Wed Apr 23, 2003 3:47 pm
Location: Atlanta, GA USA

Post by Chaoticz » Thu Apr 24, 2003 4:01 am

Thanks. This will do what I need. Althought it will make it a little difficult to change the order of the scripts.

I wish there was something builtin macro scheduler that would let you run sets of tests one after another.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu Apr 24, 2003 4:20 am

You wrote:
it will make it a little difficult to change the order of the scripts.
Instead of just adding Macro> at the end of the script, use some IF> statements to select from multiple choices of Macro>.

Part of the decision process for the IF condition could be reading from an ini file that is written to as the various parts of the macro are processed.

If you can verbalize the decisions, then you cam make manually them and you can create the IF conditions to do the same thing.

Merry macroing......
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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