How do I check to see if an environment variable exists?

Stephen MacLean smaclean at
Fri Nov 23 17:27:26 EST 2018

Hi All,

Looking to see how I check to see if my standalone was launch via command line with a parameter?

I know that when it’s launched via command line with a parameter in windows, I will see a $0 (Name of executable) and $1 for the parameter.

Since this is a dual launch able app, double click and command line with parameter I have the following in the main stack:

on openStack

if exists($1) then

put $1 into pState

put "prod" into pMode

runBuildAndPush pState, pMode

end if

end openStack

However, the exists($1) never returns true, even when it should. Which leads to to believe that’s not what I want to use.

How would I test to see if the $1 variable exists?


Steve MacLean

More information about the use-livecode mailing list