Integrate Skype users into Address Book

Dec 29, '04 08:48:00AM

Contributed by: macsebi

Skype is a fairly new, neat VoiceOverIP application which uses less bandwith then iChat, and you can talk to Windows users as well as calling normal phones (the offline world still exists!). Browsing the Skype Forums one day, I found this thread which contains an Address Book plug-in script for Skype users. A user named bertimike wrote the script, and has made it available for download (4KB) on his .Mac page.

This plug-in only works for phone numbers (or Skype names within the phone fields of Address Book). However, you can work around this by placing two copies in your /Library -> Address Book Plug-Ins folder. Then change the phone action property in one of them into jabber, and rename the script. This one now becomes active for any "chat" entry of your contacts. Just place their Skype name there.

[robg adds: To help save bertimike's bandwidth, I've decided to reproduce the script in the remainder of this hint. So you can either click above to download, or read the rest of the hint to see the source...]

Here's the AppleScript code for this plug-in:

using terms from application "Address Book"
  on action property
    return "phone"  
  end action property
  
  on action title for p with e
    return "Call with Skype"
  end action title
  
  on should enable action for p with e
    return true
  end should enable action
  
  on perform action for p with e
    
    set x to value of e as string
    if character 1 of x is not "+" then
      set x to "+1" & x
    end if
    
    set SKYPEurl to "callto://" & x
    tell application "Skype"
      get URL SKYPEurl
      activate
    end tell
    return true
  end perform action
end using terms from

Comments (10)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20041227175059613