Skype is one of my favorite applications. I recently used Skype to call someone in Russia and it only cost a few cents. I’ve also been studying the Skype API, which opens some interesting possibilities.
On a Mac, you can combine simple Applescript commands with simple Skype commands to open a lot of possibilities. For example, this Applescript opens Skype and calls the best taco shop in Provo, UT:
tell application “Skype”
send command “CALL +18013774710″ script name “Call the best taco shop in Provo, UT”
end tell
Skype can be scripted to automatically make phone calls, chat by video or text, or send text messages. You can also pipe in any audio or record the phone call.
This has interesting implications for companies like MacMiniColo.net that use Macs as servers (disclosure: I’m a friend of its owner and staff, and I’ve done contract work for them in the past.) Combining Applescript, Skype, shell scripting, and the say command, your server could be configured to call your cell phone when there’s an outage and tell you what the problem is.
Jon Udell’s podcast about communications-enabled business processes discusses the integration of voice calls into computer processes. They discuss examples where a business process may need approval from a supervisor. With voice integration, the computer could call a manager with a “press 1 to approve, press 2 to disapprove” message.
Skype + Applescript is sort of the poor man’s version of VOIP web services, but it’s exciting that you could actually do something interesting with it today.
I’m sure this would be dead simple for anyone who knows how to applscript but unfortunately I don’t.
Thanks in advance!
Don
tell application “iChat”
activate
end tell
tell application “System Events” to keystroke “n” using {command down, option down}
– Type ‘phone #’
delay 1.719537
set timeoutSeconds to 2.0
set uiScript to “keystroke \”YOUR PHONE NUMBER HERE
\”"
my doWithTimeout(uiScript, timeoutSeconds)
end run
on doWithTimeout(uiScript, timeoutSeconds)
set endDate to (current date) + timeoutSeconds
repeat
try
run script “tell application \”System Events\”
” & uiScript & ”
end tell”
exit repeat
on error errorMessage
if ((current date) > endDate) then
error “Can not ” & uiScript
end if
end try
end repeat
end doWithTimeout
– Type ‘TEXT MESSAGE’
delay 1.719537
set timeoutSeconds2 to 2.0
set uiScript2 to “keystroke \”YOUR TEXT HERE
\”"
my doWithTimeout2(uiScript2, timeoutSeconds2)
end run
on doWithTimeout2(uiScript2, timeoutSeconds2)
set endDate to (current date) + timeoutSeconds2
repeat
try
run script “tell application \”System Events\”
” & uiScript2 & ”
end tell”
exit repeat
on error errorMessage
if ((current date) > endDate) then
error “Can not ” & uiScript
end if
end try
end repeat
end doWithTimeout2
end
Don
Don