Stephen MacLean wrote:

> 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.
...
> How would I test to see if the $1 variable exists?

   if "$1 is among the lines of the globalNames then ...

But that won't tell you if your app is running from the command line.

If the user double-clicks a document associated with your app, the OS will pass the path to the document to the app in $1.

To determine if an app is running facelessly from the command line (assuming you include -ui as an option with the command to bypass loading the GUI), see the environment function:

   if the environment is "command line" then ...

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to