Parameters with Macro Application

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
winstein
Pro Scripter
Posts: 84
Joined: Mon Nov 26, 2012 3:44 pm

Parameters with Macro Application

Post by winstein » Mon Jul 21, 2014 8:32 am

There are some files that are able to detect trailing parameters when used with Command Prompt or Task Scheduler. Is there any way to apply a set of parameters in a Macro Application and have the system able to detect them within the code?

Thanks for reading.
PPQ

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

Re: Parameters with Macro Application

Post by JRL » Mon Jul 21, 2014 1:18 pm


winstein
Pro Scripter
Posts: 84
Joined: Mon Nov 26, 2012 3:44 pm

Re: Parameters with Macro Application

Post by winstein » Tue Jul 22, 2014 8:18 am

I saw that link, and then I also tried to enter parameters into an executable file (that is compiled). It works from what I see, but one thing I would like to know is, in case a certain parameter is omitted, how do I give it a default setting?
PPQ

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

Re: Parameters with Macro Application

Post by JRL » Tue Jul 22, 2014 12:51 pm

You would use the Assigned> function. Put code similar to this at the top of your script. Assigned> checks to see if the variable name has been given a value and returns "FALSE" if it has not.

Code: Select all

Assigned>parameter_1,result

If>result=FALSE
  Let>parameter_1=default value
EndIf

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