Sorry if I wasn’t clear.

I want my application to be able to catch parameters sent to it via the command 
line.

The relaunch handler does that for Windows applications and also doesn’t open 
another instance of the application. You are correct that Mac apps run in a 
single instance by default and that is the behavior I want.

I don’t want to open a document…I want to do something with the command line 
parameters sent to my app.

Bill

> On Mar 27, 2019, at 8:01 PM, Richard Gaskin via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Bill Vlahos wrote:
> 
> > I want to receive command line parameters in my application.
> >
> > The relaunch pCommandLineArguments works perfectly in Windows apps.
> >
> > What is the equivalent handler for MacOS X apps?
> 
> There's no direct equivalent because Mac apps run in a single instance by 
> default.
> 
> If you want to open a document use this:
> 
> on appleEvent theClass,theID
>   if theClass is "aevt" and theID is "odoc" then
>      request appleEvent data
>      put it into theFiles
>      if theFiles is not "not found" and theFiles is not empty then
>         ## code to open theFiles
>      end if
>   else
>      pass appleEvent
>   end if
> end appleEvent
> 
> 
> If you want to emulate the Windows experience by having an app run in a 
> separate process each time it's opened, there's a command line option for 
> that (I can't recall what it is, but last time I looked it up it did take 
> long).
> 
> -- 
> 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


_______________________________________________
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