zhasm
2/22/2013 - 11:27 AM

send text msg to iPhone via Messages.app under bash commandline

send text msg to iPhone via Messages.app under bash commandline

#!/bin/bash

exec osascript <<EOF
set peopleICareAbout to {"MyFullName"}
tell application "Messages"
    repeat with myBuddy in buddies
        if full name of myBuddy is in peopleICareAbout then
            send "$*" to myBuddy
        end if
    end repeat
end tell