On Oct 10, 2011, at 4:41 PM, Jerry Krinock wrote: > NSAppleScript does not seem to have any asychronous/callback methods for > executing scripts. The only solution I can think of is to not use it. > Instead, maybe launch the script as an application, and return the result by > writing it to a temp file which I'm observing with a kqueue, or some other > form of interprocess communication. I don't think AppleScripts can talk to > Mach ports. > > Any suggestions to make this simple little enhancement less painful?
Try using NSTask to launch /usr/bin/osascript. You can read the script’s return value from the task’s stdout. —Jens_______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
