Re: launching an app with apple events and waiting for it to quit?
Re: launching an app with apple events and waiting for it to quit?
- Subject: Re: launching an app with apple events and waiting for it to quit?
- From: Jon Chappell <email@hidden>
- Date: Thu, 16 May 2013 11:14:07 -0700
You could write information from the helper app to a file that the main plugin reads. Alternatively you could communicate with distributed notifications (I have not found these to be 100% reliable though) or sockets if the sandbox allows.
On Thu, May 16, 2013 at 11:03 AM, George Toledo
<email@hidden> wrote:
Off the top of my head, when it comes to the opening of the app, I think the most modern way to do it would be with NSWorkspace. Something like:
[[NSWorkspace sharedWorkspace] launchApplication:appPath]
I think NSWorkspace may also have methods for closing the app, maybe the file stuff too? Not sure about that. I would look at the framework notes and use those methods if possible.
You definitely can open/close with apple events as well, but it doesn't seem like the way that's being promoted.
On May 16, 2013, at 1:42 PM, Paul Miller <email@hidden> wrote:
> It seems apple events may be my only option. Does anyone know how to launch an app with an "open" event, sending it a file, and then wait for it to quit, and *also* retrieve the "result code" returned by main()?
>
> Is that even possible?
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Pro-apps-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden