What is Macintosh equivalent of relaunch handler?

Bill Vlahos bvlahos at mac.com
Thu Mar 28 19:18:39 EDT 2019


GetOpt looks exactly like what I want.

The docs specify on startup is only sent when the application is opened. This won’t work for me as I want to catch command line parameters ongoing while my application stays open.

What would the syntax be if I want to catch 3 items some of which could contain multiple words with a space between them?

Thank you,

> On Mar 28, 2019, at 2:54 PM, Richard Gaskin via use-livecode <use-livecode at lists.runrev.com> wrote:
> Bill Vlahos wrote:
> > I want my application to be able to catch parameters sent to it via
> > the command line.
> Ah, much simpler problem.
> macOS is a certified Unix.  It works just like Linux.
> On startup, you can check $# for the number of args passed in the command line, or $1, $2, etc. to get the value of any one of them.
> If you need really sophisticated command-line argument handling, check out the getOpt function Peter Brett added for that:
> https://livecode.fandom.com/wiki/Getopt <https://livecode.fandom.com/wiki/Getopt>
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> ____________________________________________________________________
> Ambassador at FourthWorld.com <mailto:Ambassador at FourthWorld.com>                http://www.FourthWorld.com <http://www.fourthworld.com/>

More information about the use-livecode mailing list