how to check, if var passed by commandline to MSched exists

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
matthiasR
Pro Scripter
Posts: 52
Joined: Tue Jan 20, 2004 3:45 pm
Location: Lübbecke, Germany

how to check, if var passed by commandline to MSched exists

Post by matthiasR » Tue Mar 27, 2007 1:01 pm

Hi,
i am trying to find out, how i can manage the following.

I want to allow passing serveral paramaters/variables to the script by commandline. If none of these variables were passed, the script should open with a gui. Otherwise it should run without.

The problem is, if a variable is not passed to the script, i am not able to check this. I thought, i just could use an if-statement,

e.g. IF>VAR1=""

but because the var does not exists at this time, this does not work.

Any idea? Maybe a dumb question, but i have no clue.

Regards,

Matthias

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

Post by JRL » Tue Mar 27, 2007 1:15 pm

Check out the Assigned> function.

Code: Select all

//Let>variable=1
assigned>variable,result
If>result=TRUE
  MessageModal>variable = %variable%
Else
  MessageModal>variable has no value
EndIf

matthiasR
Pro Scripter
Posts: 52
Joined: Tue Jan 20, 2004 3:45 pm
Location: Lübbecke, Germany

Post by matthiasR » Tue Mar 27, 2007 1:25 pm

Thanks,

i knew it was a dumb question ;-)

Looked into command reference before, but some how i missed "assigned".

Regards,

Matthias

fightcancer
Macro Veteran
Posts: 250
Joined: Fri Apr 15, 2005 8:32 am

Re:

Post by fightcancer » Wed Nov 20, 2024 10:10 pm

JRL wrote:
Tue Mar 27, 2007 1:15 pm
Check out the Assigned> function.
Thanks for this!

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