On Wed, 10 Nov 2010 13:34:09 -0500, "McLaughlin, Michael P." <[email protected]> said: >Is there any standard way for a Cocoa app to test whether it was launched >from a script, esp. AppleScript?
All apps are launched the same way - by sending them an oapp Apple event (or similar). It doesn't matter whether it came from the Finder (double-clicking the app) or a script; an Apple event is an Apple event. That's the whole point of Apple events; they are a universal system level messaging system. If the question is "Who is sending me this oapp Apple event?", I don't think there's any way to find that out because in a Cocoa app by the time your code runs that's already happened. m. -- matt neuburg, phd = [email protected], <http://www.apeth.net/matt/> A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! http://www.apeth.net/matt/default.html#applescriptthings_______________________________________________ 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]
