• 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: set property values dynamically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Address Book: set property values dynamically


  • Subject: Re: Address Book: set property values dynamically
  • From: Timothy Bates <email@hidden>
  • Date: Fri, 11 Apr 2008 14:19:21 +0100

Properties are addressed by name, not by string

So you say
   set last name to  "Schopenhauer"
NOT
   set "last name" to  "Schopenhauer"

If what you are asking is does Applescript have the equivalent of php's ability to reference a variable using the contents of a string, the answer is no.

FYI, in php you can de-reference a variable using the "$$" construct:

   $another_variable = "hello";
   $lastName = "another_variable"
   echo $$lastName;
--> Hello


On 10 Apr 2008, at 8:13 PM, Todd Geist wrote:
Is there a way to set the the property of a person dynamically???
tell application "Address Book"

set thePerson to person id "28F0E618-55D1-4E37-BC2A- A1D6FCB2B3AE:ABPerson"
set theProp to "Last Name"
set theProp of thePerson to "MY LAST NAME"
end tell


_______________________________________________
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: Address Book: set property values dynamically
      • From: Todd Geist <email@hidden>
References: 
 >Address Book: set property values dynamically (From: Todd Geist <email@hidden>)

  • Prev by Date: Re: Really basic Finder question
  • Next by Date: Re: Address Book: Getting a reference to email by ID
  • Previous by thread: Address Book: set property values dynamically
  • Next by thread: Re: Address Book: set property values dynamically
  • Index(es):
    • Date
    • Thread