• 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
newbie question re lists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

newbie question re lists


  • Subject: newbie question re lists
  • From: peter <email@hidden>
  • Date: Mon, 14 Apr 2003 13:46:01 +0200

I'm trying to load a text view in my applescript studio application
with a phone list derived from the OSX address book
I just keep getting errors telling me that the variable " contact_list"
is not defined
any idea why I can't get it to work?
many thanks
Peter

on awake from nib theObject
tell application "Address Book"
set the contact_list to {}
repeat with i from 1 to the count of people
set this_person to person i
set these_props to the properties of this_person
set the first_name to the first name of these_props
set the last_name to last name of these_props
set the phone_list to the value of every phone of this_person
if the first_name is missing value and the last_name is missing
value then
set this_entry to ""
else if the first_name is missing value and the last_name is not
missing value then
set this_entry to last_name
else if the first_name is not missing value and the last_name is
missing value then
set this_entry to first_name
else
set this_entry to last_name & ", " & first_name
end if
if this_entry is not "" then
set the end of the contact_list to this_entry & ", " & phone_list
end if
end repeat
end tell
end awake from nib


on clicked theObject

tell window "main"
set contents of text view "address" of scroll view "scroll" to
contact_list
end tell

end clicked
_______________________________________________
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.

  • Prev by Date: Re: Help with Error in do shell script
  • Next by Date: Re: UI Scripting deep menus
  • Previous by thread: Please disregard "Re: IF Syntax"
  • Next by thread: newbie( Mail App)
  • Index(es):
    • Date
    • Thread