Re: access violation in OS X 10.10.3
Re: access violation in OS X 10.10.3
- Subject: Re: access violation in OS X 10.10.3
- From: Chris Page <email@hidden>
- Date: Sat, 02 May 2015 03:28:51 -0700
On May 2, 2015, at 3:14 AM, Chris Page < email@hidden> wrote:
The executive summary is: don't send events to another application unless you mean it. Don't put them inside a tell-application block unless you need to execute it within the other application process. (Or prefix it with a "tell me to …" or "my" to ignore the current target of the tell block.)
To help cut down on the need for tell-application blocks and the resulting "tell me to"'s inside the block, "use" imports terms from applications and AppleScript sends events to wherever the term was imported from.
For example:
use application "Finder" use application "Safari"
set desktopItems to items of the desktop --> Sent to Finder. search the web for "Pomplamouse" --> Sent to Safari.
For terms that are unambiguous, you no longer need to target the application explicitly, and you can mix "current date" in with Finder scripting without putting it inside a "tell Finder" block that would send "current date" to Finder.
-- Chris Page The other, other AppleScript Chris
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden