• 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: Trouble Getting Into AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble Getting Into AppleScript


  • Subject: Re: Trouble Getting Into AppleScript
  • From: Daniel Todd Currie <email@hidden>
  • Date: Tue, 2 Nov 2004 13:42:54 -0800

Oh, and here I was thinking that because "get selection" returns a list, I would need to pass a list in "set selection". Thanks for clearing that up.


On 2004 Nov 02, at 13:02, Christopher Nebel wrote:

No, this just looks like a bug in Address Book. Perversely, it has no problem setting the selection to a single person, or even some sort of range expression, but it chokes on an actual list. For example:

tell application "Address Book"
set selection to person "Chris Nebel" --> selects me.
set selection to person id "4A4726F1-A591-11D6-B9F7-0003937618D8:ABPerson" --> selects me.
set selection to every person whose last name is "Nebel" --> selects me and a bunch of my relatives.
set selection to {person "Chris Nebel"} --> Address Book got an error: NSUnknownKeyScriptError
end



--Chris Nebel AppleScript Engineering

_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: Trouble Getting Into AppleScript (From: Christopher Nebel <email@hidden>)
 >Re: Trouble Getting Into AppleScript (From: Daniel Todd Currie <email@hidden>)
 >Re: Trouble Getting Into AppleScript (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: Bridge anyone? [not off topic]
  • Next by Date: How to close a file
  • Previous by thread: Re: Trouble Getting Into AppleScript
  • Next by thread: OmniGraffle - Insert Image
  • Index(es):
    • Date
    • Thread