My first AppleScript: Copy Address Book entries

2007 May 10
by tobi

Tatataa! I just wrote my frist AppleScript. For displaying the buddypicture of my Address Book contacts in Adium, I had to copy the ICQ entry to a new Jabber enrty with appending “@jit.jabber.fsinf.de”. The code follows:

tell application "Address Book"
set thePeople to every person whose ICQ handles is not {} and Jabber handles is {}
repeat with eachPerson in thePeople
set icqnr to value of ICQ handles of eachPerson
set jabberid to (item 1 of icqnr) & "@jit.jabber.fsinf.de"
make new Jabber handle at end of Jabber handles of eachPerson with properties {label:"Home", value:jabberid}
end repeat
save addressbook
end tell

It worked out fine. Now I see you all in my buddylist ;-)

One Response leave one →

Trackbacks & Pingbacks

  1. My first AppleScript: Copy Address Book entries | Lustauffotos.de

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS