|
Skype
Dit is een script om via het Adresboek (Mac OS X) een telefoonnummer met Skype te kiezen. De tekst van het item kunt u veranderen in de eerste regels van het script, evenals uw eigen landnummer.
Het script zorgt ervoor dat telefoonnummers in internationale vorm worden gedraaid en dat formattering, bijvoorbeeld (020), wordt genegeerd. Als iTunes speelt, stopt de muziek automatisch...
Here is a script to make Skype phone calls from your Address Book (Mac OS X). Two properties can be defined in the first lines of the script: your international country code (e.g., '+44' for Great Britain), and the text for the menu item (e.g., 'Dial with Skype').
The script modifies telephone numbers so that Skype can use them : international format, no spaces or brackets. If iTunes is playing, the music stops...
|
Ophalen, uitpakken en in de map Address Book Plug-Ins plaatsen (in een Library, eventueel eerst zelf deze map maken). Adresboek herstarten. Verander het script met de Script Editor. |
|
Script
(zip) |
Download, unzip and put in folder Address Book Plug-Ins (in Library). Restart Address Book. Use Script Editor to modify the script. |
property my_country_code : "+31"
property menu_item : "Dial with Skype"
using terms from application "Address Book"
on action property
return "phone"
end action property
on action title for the_person with the_data
return menu_item
end action title
on should enable action for the_person with the_data
return true
end should enable action
on perform action for the_person with the_data
set x to value of the_data as string
set y to ""
set z to {"+", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"}
repeat with i from 1 to number of characters in x
set ltr to character i of x
if ltr is in z then set y to y & ltr as string
end repeat
if character 1 of y is not "+" then
set y to characters 2 thru -1 of y as string
set y to my_country_code & y
end if
set the_url to "callto://" & y
tell application "System Events"
set the process_flag to (exists process "iTunes")
end tell
if the process_flag then
tell application "iTunes"
if player state is playing then pause
end tell
end if
tell application "Skype"
get URL the_url
activate
end tell
return true
end perform action
end using terms from
|