• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Test for launched from (Apple)Script?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Test for launched from (Apple)Script?


  • Subject: Re: Test for launched from (Apple)Script?
  • From: "email@hidden" <email@hidden>
  • Date: Wed, 10 Nov 2010 19:35:51 +0000


On 10 Nov 2010, at 18:34, McLaughlin, Michael P. wrote:

> Is there any standard way for a Cocoa app to test whether it was launched
> from a script, esp. AppleScript?  I would like to set a flag to disable
> dialogs so that users could run the app in (faceless) batch mode.
>
> Thanks.
>
> --
> Mike McLaughlin
>

Maybe it's just me but I am not sure if this question makes a whole lot of sense.

AppleScript runs in process so a multitude of applications could launch your app by generating and dispatching the appropriate AppleEvent.
Or do you want to ascertain if the app was launched by AppleScript Editor.app?

Is the app to be scripted by users?

In that case it might be better to make your app scriptable and send it an explicit event to request batch mode.

Regards

Jonathan Mitchell

Developer
Mugginsoft LLP
http://www.mugginsoft.com

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Test for launched from (Apple)Script? (From: "McLaughlin, Michael P." <email@hidden>)

  • Prev by Date: Re: Moderator - Re: iPad 4.2 (deploy to 3.2.2) error
  • Next by Date: Re: Moderator - Re: iPad 4.2 (deploy to 3.2.2) error
  • Previous by thread: Test for launched from (Apple)Script?
  • Next by thread: Re: Test for launched from (Apple)Script?
  • Index(es):
    • Date
    • Thread