It’s official, Skype for Mac allows for the sending of SMS - the beta version at least. The system is cheap, convenient, seems relatively reliable and, if I had not my doubts about that whole Skype thing overall, I would say it appears to be a clear winner. The best part? AppleScript integration!
Small businesses on the web, like design agencies, small hosts or site developers struggle to develop a tight business relationship with their clients. In a great many ways, SMS is the only way to reach people on the go. And on the web, you sometimes need to. Sure, there is email but, at least in Europe, a great many people do not have email capabilities enabled on their phone, because receiving them comes up at a higher cost than the free SMS.
Be careful however, maybe more than email, SMS is not to be abused. Whenever you send one, you actually cause a device to ring, vibrate or otherwise bug the hell out of people. We all have had it with that poor Japanese girl screaming that it is “Her Moto” at 7 AM in a crowded commuter train. Across the globe, you need to pay attention to time zones too - I receive about 15 SMS per night from various servers and sometimes get killing urges. Finally, SMS are expensive to send when you only send a few, a lot more so than email. Yet, their very instantaneity makes them an ideal medium for emergency or technical communications. For example:
- The client’s site or service went live
- The package is arriving to their door
- Their server is down and you are bringing it up
- You renewed their yearly billing
So, may you ask, what are you to do? Let’s say you have performed emergency maintenance on a server and need to contact people hosted on a machine named “Tarsier”. As luck has it, you store that information in your address book in the note field of every card, along with other client information.
The script below will ask you for the name of the server that experienced an issue, then pull all cards from your Address book containing that name. From these cards, it extracts the first name of the client, for that extra touch, as well as the first mobile phone number that it can find. It then composes an SMS message and sends it its merry way.
For this trick to work, you will need the latest version of Tiger, the latest beta version of Skype with SMS capability, sufficient SkypeOut credit and, of course, a phone capable of receiving SMS. Please note I am not a developer, just a French dude. The code below comes with no warranty whatsoever, neither expressed nor implied. Use it at your own and sole risk. This code will cost you money to test since it will use some SkypeOut credit. It may fail horribly with unintended consequences so I suggest you test on a machine with an Address Book containing only cards for you and/or willing beta testers. Abusing this system may break the Skype Terms and Conditions, the law of your country and all codes of good conduct. Before testing, make sure you and your testers are not charged per SMS received - an uncommon situation but, heh, this is the Internet.
Add “Server : Tarsier” to the address book cards you wish to test with. Then, change cards to save the note. Make sure phone numbers contain no spaces, dots or dashes and are written with their full country code - for example, +33800046046.
This being said, it seems to work from where I stand.
tell application "Skype" to set theServerName to (text returned) of (display dialog "Please enter a server name:" with icon 1 default answer "")
tell application "Address Book"
set allPeopleToContact to ((people whose note contains (("Server: " & theServerName) as string)) as list)
repeat with thePersonWeAreContacting in allPeopleToContact
set theFirstName to (first name of thePersonWeAreContacting)
set thePhone to (value of ((first phone of thePersonWeAreContacting) whose label = "mobile"))
set theSMSText to "Dear " & theFirstName & ", this little note to inform you that your server \"" & theServerName & "\" suffered a short outage today. Things are now back to normal."
tell application "Skype"
set TheSMS to (word 2 of (send command ("CREATE SMS OUTGOING " & thePhone) script name "Notifier") as text)
send command (("SET SMS " & TheSMS & " BODY " & theSMSText) as string) script name "Notifier"
send command (("ALTER SMS " & TheSMS & " SEND") as string) script name "Notifier"
end tell
end repeat
end tell


Not entirely sure how your nationality comes in as an excuse for no warranty...
Mike,
Here, I plead my nationality as an excuse for weird humor! ;^)
Just a joke...
FJ
I'd like to mention that our product SMS Mac, has been scriptable since April 2006. With SMS Mac, you can do exactly the same thing. Actually, since we support Group SMS, you can send the SMS with one command (although the SMS in that case is not 'personalized'). SMS Mac also gives your delivery reports by email. More info about SMS Mac is available here: http://www.smsmac.com.
What is shown in the sender details of the sms?
Stephen,
That would be either the first 11 characters of your Skype ID or a phone number of your choosing. In some countries, it will be neither due to some carrier restriction - Skype has a couple Knowledge Base documents on that, which are probably best not quoted as it may change. I like setting it up to a non-phone value as most phones will intelligently prevent users from replying. For large groups, this makes it easy to set up an "announce-only" system. Obviously, that does not apply to individuals.
FJ
Thanks, great article by the way, also i fully understand the need for a disclaimer to french humor :D
Stephen,
You're most welcome! :^)
FJ
> "Please note I am not a developer, just a French dude."
Genius. I'll have to use that, despite not being French.
Paul,
Glad you think so! ;^)
FJ
May be different in France, but most US-based cell companies are now charging for SMS sent & received.
Spiffy disclaimer.
Nick,
Different in France indeed. We're never, ever charged for incoming SMS on regular plans, though I expect that could change any time. Operators run on the principe that you're bound to reply to what you receive and that, hence, they've already got you! ;^)
Thanks for posting!
FJ
Sorry all, I will be closing comments on this entry because of a SPAM attack. Feel very free to email me (as always) with questions or concerns regarding this post.