• 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: Short, maybe even handy, Address Book script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Short, maybe even handy, Address Book script


  • Subject: Re: Short, maybe even handy, Address Book script
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 24 Jun 2003 18:27:19 -0700

On 6/24/03 10:37 AM, "Michelle Steiner" <email@hidden> wrote:

> tell application "Address Book"
> set M_List_Group to people of group "Mailing Lists"
> repeat with This_Person in M_List_Group
> set label of email 1 of This_Person to "List"
> end repeat
> end tell
>
> It would have been nice if, instead of the repeat loop, it would be
> possible to do this:
>
> set label of email 1 of every item of M_List_Group to "List"

'email 1' is an element, not a property. This sort of 'propertyA of
properytB of every elementC' only works for property chains. And even then
you have to use the application properties directly, not in AppleScript
lists. So if there were, say, a 'default email' property of a person in
Mail, as there is in Entourage, you'd be able to say:

set label of default email of every person of group "Mailing Lists" to
"List"

but not:

set label of default email of every item of M_List_Group to "List"

However, since there's no such thing as 'default email' (nor 'default
address' nor default anything else) in Address Book, you can't use that
construction with 'email 1'.


Neither of these limitations (can't use with elements, can't use with lists)
is specific to Address Book: it's AppleScript syntax.

--
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: Short, maybe even handy, Address Book script
      • From: Shane Stanley <email@hidden>
    • Re: Short, maybe even handy, Address Book script
      • From: Michelle Steiner <email@hidden>
References: 
 >Short, maybe even handy, Address Book script (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Get position of item in list
  • Next by Date: Re: Selection in Safari
  • Previous by thread: Short, maybe even handy, Address Book script
  • Next by thread: Re: Short, maybe even handy, Address Book script
  • Index(es):
    • Date
    • Thread