Re: Procedure Problem
Re: Procedure Problem
- Subject: Re: Procedure Problem
- From: Michelle Steiner <email@hidden>
- Date: Tue, 11 Mar 2003 09:04:16 -0700
On Tuesday, March 11, 2003, at 07:45 AM, Darwin Zins wrote:
I get an error: "Expected class name but found identifier." and it
highlights phone in the (every pphone of aCard).
That's because phone is a variable there. Try this instead:
on set_a_vars(aCard)
tell application "Address Book"
repeat with aPhone in (every phone of aCard)
tell aPhone
set phoneLabel to (get the label as Unicode text)
if phoneLabel is equal to "home" then
set a_home_phone to (get the value as Unicode text)
else if phoneLabel is equal to "mobile" then
set a_home_mobile to (get the value as Unicode text)
else if phoneLabel is equal to "home fax" then
set a_home_fax to (get the value as Unicode text)
else if phoneLabel is equal to "work" then
set a_business_phone to (get the value as Unicode text)
else if phoneLabel is equal to "work fax" then
set a_business_fax to (get the value as Unicode text)
end if
end tell
end repeat
end tell
end set_a_vars
--Michelle
--
Give Peace A Chance.
_______________________________________________
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.