Richard,

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,
Bill



> On Mar 28, 2019, at 2:54 PM, Richard Gaskin via use-livecode 
> <use-livecode@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
> ____________________________________________________________________
> ambassa...@fourthworld.com <mailto:ambassa...@fourthworld.com>                
> http://www.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