• 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: why doesn't this work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Address Book: why doesn't this work?


  • Subject: Re: Address Book: why doesn't this work?
  • From: Matthew Smith <email@hidden>
  • Date: Fri, 20 Jan 2006 12:41:49 +1100
  • Thread-topic: Address Book: why doesn't this work?

Title: Re: Address Book: why doesn't this work?
on 20/01/2006 12:25, Rob Lewis at email@hidden wrote:

tell application "Address Book" --ready to create a new Address Book record
set ABpersref to (make new person with properties ¬
{first name:ABfname, middle name:ABmname, last name:ABlname, job title:ABtitle, department:ABdept, organization:ABco, note:ABnote, company:false})
tell person ABpersref
make new address with properties {label:"Work Address", city:ABwkcity, country:ABwkctry, state:ABwkstate, street:ABwkadr, zip:ABwkzip}
make new address with properties {label:"Home Address", city:ABhmcity, country:ABhmctry, state:ABhmstate, street:ABhmadr, zip:ABhmzip}
make new phone with properties {label:"Work", value:ABwkphone}
make new phone with properties {label:"Home", value:ABhmphone}
make new phone with properties {label:"Fax", value:ABfaxphone}

if length of name = 0 then set company to true --"company" is a boolean; we'll set true if composite name is empty
end tell --person ABpersref

end tell --Address Book

When run, it highlights the first "make new address" statement with this error message:
Address Book got an error: Can't make person (person id "2F7657BA-AFDC-4A0F-AE0F-083FF023C1FF:ABPerson") into type reference.

Change:
tell person ABpersref
To
tell ABpersref


--
Matthew Smith
 _______________________________________________
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: why doesn't this work? (From: Rob Lewis <email@hidden>)

  • Prev by Date: Re: Counting Messages in "Inbox"
  • Next by Date: Re: Address Book: why doesn't this work?
  • Previous by thread: Address Book: why doesn't this work?
  • Next by thread: Re: Address Book: why doesn't this work?
  • Index(es):
    • Date
    • Thread