• 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: access violation in OS X 10.10.3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Commanding with Use and Search The Web
      • From: Alan Kimelman <email@hidden>
References: 
 >Re: access violation in OS X 10.10.3 (From: Chris Page <email@hidden>)

  • Prev by Date: Re: access violation in OS X 10.10.3
  • Next by Date: Re: ql-manage script not working
  • Previous by thread: Re: access violation in OS X 10.10.3
  • Next by thread: Commanding with Use and Search The Web
  • Index(es):
    • Date
    • Thread