Stephen MacLean via use-livecode
2018-11-23 22:27:26 UTC
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?
TIA,
Steve MacLean
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?
TIA,
Steve MacLean