Send an iMessage with an AppleScript

I don’t like waiting around for long processes to finish on my Mac, so I was recently hunting for a way of sending push notifications to my iPhone/iPad.. I gave up after a while, realising that nothing seemed reliable enough.. So then I changed tact, and that’s when I came up with this AppleScript. This uses OS X’s built in message’s app to send an iMessage to my mobile!

tell application "Messages"
	set intid to get id of first service
	set myRecipient to myRecipient "+44123456789" of service id intid
	send "Your full machine backup has now completed" to myRecipient
end tell
tell application "Messages"
	quit
end tell

This could quite easily be built into Automator Workflows etc.

Mike Hudson

Mike Hudson is a Infrastructure Analyst living and working in Kingston Upon Hull. With extensive experience in Microsoft and Apple technologies, ranging from desktop OS’s to Server OS’s and hardware. By day working as part of an infrastructure team, and by night ridding the world of IT issues through blog posts..

%d bloggers like this: