Procedure Problem
Procedure Problem
- Subject: Procedure Problem
- From: Darwin Zins <email@hidden>
- Date: Tue, 11 Mar 2003 08:45:05 -0600
Can anyone tell me why I can't do this:
tell application "Address Book"
repeat with aPerson in every person
my set_a_vars(aPerson)
end repeat
end tell
on set_a_vars(aCard)
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 set_a_vars
I get an error: "Expected class name but found identifier." and it
highlights phone in the (every pphone of aCard).
Also, the code that I was looking at does the get the value as Unicode
text, do I really need the as Unicode text part?
Thanks,
Darwin
_______________________________________________
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.