Skype video call shortcut in MacOSX

I use Skype to make video calls mainly to a couple of contacts. I didn’t want to enable video automatically for all calls and at the same time I find it tiring to search for the contact name and place a video call.

I wanted something easy to automate that. Here is a simple Automator written in AppleScript which will take care of that:

on GetPart(s, p, d)
set theList to every text item of s
return (item p of theList)
end GetPart
on run {input, parameters}

(* Your script goes here *)
activate application "Skype"
tell application "System Events"
delay 1
set AppleScript's text item delimiters to " "
tell application "Skype"
set login to "luca.gibelli"
set foo to send command "GET USER " & login & " ONLINESTATUS" script name "MyScript"
set UserStatus to my GetPart(foo, 4, " ")
if UserStatus is "ONLINE" then
say "calling " & login
set Res to send command "CALL " & login script name "MyScript"
set CallId to my GetPart(Res, 2, " ")

copy (run script "tell application \"Finder\" to desktop's window's bounds") to bounds of window 1
set MaxTries to 60
set CallStatus to "unknown"
repeat while (CallStatus is not "INPROGRESS" and CallStatus is not "REFUSED" and CallStatus is not "FAILED" and MaxTries > 0)
delay 1
set MaxTries to MaxTries - 1
set Res to send command "GET CALL " & CallId & " STATUS" script name "MyScript"
set CallStatus to my GetPart(Res, 4, " ")
end repeat
if CallStatus is "INPROGRESS" then
send command "ALTER CALL " & CallId & " START_VIDEO_SEND" script name "MyScript"
end if
say login & "offline!"
end if
end tell
end tell

return input

end run

Of course I wanted to also enable video automatically when answering calls from specific contacts. Fortunately Skype Extender does just that!


Leave a Reply