Dialing Phone Numbers

By default, when you open a phone number, it is displayed in large type. Alternatively you can specify an AppleScript responsible for opening phone numbers in the Actions pane of LaunchBar Preferences. This script may then dial the phone number via third party applications such as Dialectic or Skype (see the example scripts below).

Once you have specified a script for opening phone numbers you can still show the number in large type by opening it with Shift-Return.

Passing phone numbers to AppleScripts

A phone number can be opened with a particular AppleScript by sending the selected number to the desired script. Once the phone number is selected, press the Tab key, then select the desired script and press Return.

The phone number will be passed to the script’s handle_string() handler as a tel-URL, e.g. the number 555-1212 will be passed as tel:555-1212

Dialing phone numbers with Skype

The following AppleScript can be used to dial phone numbers with Skype:

on handle_string(s)
    if s starts with "tel:" then
        set s to text 5 thru -1 of s
        -- trims the URL's "tel:" scheme prefix
    end if
    if s does not start with "callto:" then
        set s to "callto:" & s
    end if

    tell application "Skype" to get URL s
end handle_string

Dialing phone numbers via Dialectic

The following AppleScript can be used to dial phone numbers via Dialectic (the successor of Jon’s Phone Tool):

on handle_string(s)
     if s starts with "tel:" then
        set s to text 5 thru -1 of s
        -- trims the URL's "tel:" scheme prefix
    end if

    tell application "Dialectic" to dial number s as string
end handle_string