RE: ADDRESS BOOK: Changing "mobile" label to "home"
RE: ADDRESS BOOK: Changing "mobile" label to "home"
- Subject: RE: ADDRESS BOOK: Changing "mobile" label to "home"
- From: Rick Gordon <email@hidden>
- Date: Mon, 9 Feb 2009 03:05:34 -0800
Never mind. I figured it out:
tell application "Address Book"
set vList to every person whose company is false
repeat with vItem in vList
tell vItem
set properties of phones to {label:"home"}
end tell
end repeat
end tell
There's a good reference at <http://www.mactech.com/articles/mactech/Vol.21/21.10/ScriptingAddressBook/index.html>
------------------
On 2/9/09 at 1:30 AM -0800, Rick Gordon wrote in a message entitled
"ADDRESS BOOK: Changing "mobile" label to "home"":
>I just got a new iPhone and imported by data from a Nokia phone, so that only the first phone number was imported, and it is labeled as "mobile." I'm trying to script a solution, but can access contact info properties, and there does not appear to be a phone property.
>
>I set up the following script to change the vcard property, hoping that that would work, but it errors with this error:
>
> "Address Book got an error: NSInternalScriptError"
>
>The script follows; what am I doing wrong?
>
>tell application "Address Book"
> set vList to every person whose company is true
> repeat with vItem in vList
> tell vItem
> set vCardText to vcard as text
> tell me
> tell application "Smile"
> try
> set vCardText to (uchange "CELL" in vCardText into "WORK")
> end try
> end tell
> end tell
> copy vCardText as text to vcard
> end tell
> end repeat
>end tell
--
___________________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________
WWW: http://www.shelterpub.com
_______________________________________________
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