• 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: "a reference to"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "a reference to"


  • Subject: Re: "a reference to"
  • From: Malcolm Fitzgerald <email@hidden>
  • Date: Mon, 7 Jan 2008 12:48:56 +1100


On 07/01/2008, at 12:08 PM, Michelle Steiner wrote:

Even after writing scripts for nearly a decade and a half, I still haven't been able to wrap my brain around "a reference to".  This script fails:

tell application "Address Book"
set M_List_Group to people of group "Mailing Lists"
set label of email 1 of every item of M_List_Group to "List"
save addressbook
end tell


In this case you are asking for every item  of M_List_Group. M_List_group is a list and the result is a list. You will remember that applescript lists do not have an "email" class nor a "label" property. You cannot say: 

set label of email 1 of every item of {1, 2, 3} to "List"

However, when you use a reference you are effectively saying :

set label of email 1 of every person of group "mailing lists" of application "address book" to "list"

in this case you are setting the property of a class of an item which is one of a range of items. 


malcolm
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: "a reference to"
      • From: Michelle Steiner <email@hidden>
References: 
 >"a reference to" (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: "a reference to"
  • Next by Date: Re: "a reference to"
  • Previous by thread: Re: "a reference to"
  • Next by thread: Re: "a reference to"
  • Index(es):
    • Date
    • Thread