• 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: How to select the current person in address book
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to select the current person in address book


  • Subject: Re: How to select the current person in address book
  • From: Paul Berkowitz <email@hidden>
  • Date: Sat, 29 May 2004 14:23:40 -0700

On 5/29/04 1:32 PM, "Sebastian Schulte" <email@hidden> wrote:

> hello,
> how can i select the current Person in the adress book ?
> -
> tell app "address book"
> set theName to name of current person as string -- this line won't
> work
> end tell
> display dialog theName

If you're not in Panther, this won't work. If you are in Panther, you don't
need 'as string':

tell application "Address Book"
set thePerson to item 1 of (get selection)
set theName to name of thePerson
display dialog theName
end tell



There's no such keyword as 'current' in the dictionary, so it was never
going to work that way.

Although the dictionary doesn't say that 'selection' is read-only, it is:
you can't select by trying to set 'selection'. There is a way, however:


tell application "Address Book" to set theID to id of person "Bloggs Joe"
open location "addressbook://" & theID

--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: How to select the current person in address book
      • From: Sebastian Schulte <email@hidden>
References: 
 >How to select the current person in address book (From: Sebastian Schulte <email@hidden>)

  • Prev by Date: Re: Catching Eject Errors
  • Next by Date: Re: How to select the current person in address book
  • Previous by thread: How to select the current person in address book
  • Next by thread: Re: How to select the current person in address book
  • Index(es):
    • Date
    • Thread