Forked from antonellopasella/Applescript to send new iMessage
Created
February 20, 2019 19:09
-
-
Save hynnet/ed14dbc43ebe06e6b4548adef17e29de to your computer and use it in GitHub Desktop.
How to send a new iMessage throug Applescript. For retrieve the contactname select your contact from list then SHIFT+CMD+I
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Messages" | |
set isAppRunning to false | |
tell application "System Events" | |
if (exists process "Messages") then | |
set isAppRunning to true | |
end if | |
end tell | |
if isAppRunning is false then | |
activate | |
end if | |
set theBuddy to buddy "contactname@imac-di-contactname" of service "bonjour" | |
send "test" to theBuddy | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment