Re: Cocoa scripting: targeting an app via its bundle identifier
Re: Cocoa scripting: targeting an app via its bundle identifier
- Subject: Re: Cocoa scripting: targeting an app via its bundle identifier
- From: Bill Cheeseman <email@hidden>
- Date: Sun, 26 Jun 2011 06:09:37 -0400
On Jun 25, 2011, at 7:52 PM, Andy Lee wrote:
> get application id "com.yourcompany.TrivialScriptable"
> set myApp to result
> tell myApp
It has been true since the beginning of time (1993) that you cannot 'tell' a variable but must instead 'tell' the application, at least in most cases. It's one of the reasons why us old timers think of AppleScript as a "trial and error" language. You have to learn many of the rules by doing, not by reading the manual.
I wrote this particular issue up at length many years ago in two old articles that are still available on The AppleScript Sourcebook at <http://macscripter.net/viewtopic.php?id=24570> and <http://macscripter.net/viewtopic.php?id=24569>. Some of what I wrote then is no longer completely true, thanks to the ongoing evolution of AppleScript.
--
Bill Cheeseman - email@hidden
_______________________________________________
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