Last active
February 20, 2019 19:09
-
-
Save antonellopasella/5212407 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 |
Hi,I want to get the result of send message, success or fault. how can i do?Thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what is the "bonjour" to fill in? My mac service?