• 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: Christopher Nebel <email@hidden>
  • Date: Tue, 2 Nov 2004 13:02:39 -0800

On Nov 1, 2004, at 10:58 PM, Daniel Todd Currie wrote:

Ok, so I got the selection property working (sorta):

tell application "Address Book"
set oldSelectionList to selection
set newSelectionList to {person id "D8B93B1D-49B2-11D8-B368-00306573E42C:ABPerson"}
set selection to newSelectionList
end tell

However I'm getting this error:

tell application "Address Book"
get selection
{person id "96BDA27C-7252-11D8-A085-00306573E42C:ABPerson"}
get person id "D8B93B1D-49B2-11D8-B368-00306573E42C:ABPerson"
person id "D8B93B1D-49B2-11D8-B368-00306573E42C:ABPerson"
set selection to {person id "D8B93B1D-49B2-11D8-B368-00306573E42C:ABPerson"}
"Address Book got an error: NSUnknownKeyScriptError"

I've tried a million different variations on this... "set the selection...", "set selection of application...", etc. Nothing seems to make any difference. I have verified that the person id to which I am trying to set the selection is in fact a valid id. ... Is there something else to the language that I am missing?

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
  • Follow-Ups:
    • Re: Trouble Getting Into AppleScript
      • From: Daniel Todd Currie <email@hidden>
References: 
 >Re: Trouble Getting Into AppleScript (From: Christopher Nebel <email@hidden>)
 >Re: Trouble Getting Into AppleScript (From: Daniel Todd Currie <email@hidden>)

  • Prev by Date: Re: Bridge anyone? [not off topic]
  • Next by Date: Re: Bridge anyone? [not off topic]
  • Previous by thread: Re: Trouble Getting Into AppleScript
  • Next by thread: Re: Trouble Getting Into AppleScript
  • Index(es):
    • Date
    • Thread