Van Maanen | Hans van Maanen | |||||
|
|
![]() |
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