• 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: Sebastian Schulte <email@hidden>
  • Date: Sun, 30 May 2004 09:38:48 +0200

Hi Paul,
this works. Thank you...

Sebastian

Am 29.05.2004 um 23:23 schrieb Paul Berkowitz:

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.
_______________________________________________
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.


References: 
 >Re: How to select the current person in address book (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Vertical Scrolling- An example that works
  • Next by Date: dumb question
  • Previous by thread: Re: 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