Re: address book: find out whether the selection contains persons or groups
Re: address book: find out whether the selection contains persons or groups
- Subject: Re: address book: find out whether the selection contains persons or groups
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 08 Nov 2004 06:51:38 -0800
Title: Re: address book: find out whether the selection contains persons or groups
On 11/8/04 3:28 AM, "olli" <email@hidden> wrote:
in an address book script which works on the current selection i want to check whether the seletion contains persons or groups.
how can i achieve this? i tried something like
tell application "Address Book"
set sel_list to selection
set p to (item 1 of sel_list)
if p is class of person then
-- do person things
beep 1
end if
if p is class of group then
-- do group things
beep 1
end if
end tell
but it doesn't work. any idea, what to do?
You've got your syntax in a twist.
if class of p is person then
-- do person thing
beep 1
else if class of p is group
-- do group things
beep 2
end if
--
Paul Berkowitz
_______________________________________________
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