• 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: address book: find out whether the selection contains persons or groups
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >address book: find out whether the selection contains persons or groups (From: olli <email@hidden>)

  • Prev by Date: Re: How to extract the email address in a the message body
  • Next by Date: Re: How to extract the email address in a the message body
  • Previous by thread: address book: find out whether the selection contains persons or groups
  • Next by thread: Re: address book: find out whether the selection contains persons or groups
  • Index(es):
    • Date
    • Thread