Re: Address Book: set property values dynamically
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