Standalone Command Line Params

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Standalone Command Line Params

Post by WaltBrown » Tue May 25, 2010 12:21 am

Hi! I have been getting very odd command line parameter responses in standalones in Windows. I have been using "-c" form for the params.

Depending on the character used I get varied yet consistent response (I tried each 3 times):
- These crash the standalone: -d,-g,-i,-v, and -w
- These return empty parameter lists (except for $0): -f,-m,-n,-p, and -s
- -u causes the process to start but no screen shows up and the process is stuck in a loop
- The rest of the alphabet is returned as appropriate in the param variable.
- It occurs whether the param is quoted or not.

Question: Are there already predefined command line options for standalones that I am conflicting with?

My entire script is :
on preOpenScript
put $0 & cr & $1 & cr into fld "fName"
end preOpenScript

All standalone settings are left at default.

By the way, the real question this is a workaround for - is there a way to send messages to stacks or standalones from a non-Rev app or script?

Thanks,
Walt
Walt Brown
Omnis traductor traditor

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Standalone Command Line Params

Post by Mark » Tue May 25, 2010 12:45 am

Walt,

There is an option "-ui" defined already. Perhaps, the RunRev engine searches for options (starting with a dash) and checks whether this option is "ui" in a second step. It is probably better to avoid custom options starting with a dash. Instead, you can use any command line parameter that starts with a letter or number.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply