Run Time Arguments
Dar Scott
dsc at swcp.com
Sat Jan 18 11:19:00 EST 2003
On Saturday, January 18, 2003, at 06:05 AM, Jez wrote:
> Can you pass run-time arguments to a revolution executable and pick
> them up in code? I'm sure the answer must be yes but how?
>
Others best respond concerning AppleScript.
But I'll make a little comment concerning command-line args.
On Windows XP I have launched standalones from a command window. The
documentation describes the command line args as being in global
variables $1, $2 and so on.
However, I find (with an exception) that they are all in $1. (The
exception occurs when an attempt is made to use quotation marks to
quote the first arg.) I consider this a bug.
On Windows you may want to limit yourself to one arg or be prepared to
change the code in the future. (If you know quotes won't be used, you
can check the number of words in $1 and $2 and based on that split out
your args. This might lessen the impact should this get fixed.)
(Command line args look like they work right on 2.0 on OS X.)
Dar Scott
More information about the use-livecode
mailing list