Re: How to select the current person in address book
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.