pass an argument into macro

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
webber123456
Newbie
Posts: 11
Joined: Thu Aug 04, 2005 10:06 pm

pass an argument into macro

Post by webber123456 » Wed Aug 10, 2005 6:41 am

if I try to call a mocro like:

C:\Program Files\Macro Scheduler\msched.exe

How can I pick up that argument in the macro for use by vbscript ?
________
MAINE MEDICAL MARIJUANA DISPENSARY
Last edited by webber123456 on Thu Feb 10, 2011 9:37 pm, edited 1 time in total.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Wed Aug 10, 2005 6:54 am

You need to call the macro like this:

...\msched.exe macroname /paramater=value1

And you simply refer to paramater in the script as a variable. It will hold the value of value1. E.g: Say you have this script:

MessageModal>Hello %name%

And call it with:

msched.exe script.scp /name=Fred

The script would then pop up a message box saying "Hello Fred".

You can have any number of parameters on the command line. E.g.:

msched.exe script.scp /var1=val1 /var2=val2 /var2=val3 /etc=etc
MJT Net Support
[email protected]

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