How do I pass a variable to a Run Program> statement?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Jerry Gilels
Newbie
Posts: 6
Joined: Tue Sep 16, 2003 2:22 pm
Contact:

How do I pass a variable to a Run Program> statement?

Post by Jerry Gilels » Fri Nov 21, 2003 7:01 pm

Isn't this the way?

Let>RP_WINDOWMODE=0

Day>the_day
Month>the_month
Year>the_year
Let>this_day=%the_month%%the_day%%the_year%
Run Program>c:\chkser.bat %this_day%

Let>RP_WINDOWMODE=1

???

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 » Fri Nov 21, 2003 9:35 pm

That looks good Jerry, but make sure that c:\chkser.bat is looking for %1 inside to use the paramater %this_day% that is being sent.

The Let>RP_WINDOWMODE=0 lines are not needed to pass parameters, but only to control the visibility of the window while it is running.

Of more importance to you may be Let>RP_WAIT=1, like this:
Let>RP_WAIT=1
Run Program>c:\chkser.bat %this_day%
Let>RP_WAIT=0
It is frequently very important to allow the Run Program to finish before continuing with the next lines in the Macro Scheduler script. The default value of RP_WAIT=0
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