Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

message by applescript

Hi,


I'm trying to send sms through applescript and since I've install high sierra it's doesn't work if I never communicate with the person.


But on Sierra it's working, does anybody have a idea why ?


Thanks you !


tell application "Messages"

send "test" to buddy "+336XXXXXXXX" of service "SMS"

end tell


tel

Posted on Nov 6, 2017 2:09 AM

Reply
11 replies

Nov 8, 2017 8:41 AM in response to cédricfromparis

I'm try a another way :


tell application "System Events" to tell process "Messages"

click menu item "Nouveau Message" of menu 1 of menu bar item "Fichier" of menu bar 1

activate

set outputString to "+33XXXXXXXXX"

set len to length of outputString

repeat with i from 1 to len

set x to character i of outputString

keystroke x

end repeat

end tell


But I don't manage to get focus on the first field to set the phone number and the message field

Nov 8, 2017 4:56 PM in response to Barney-15E

Other information when I execute the script :

in chat.db on the table handle I've have a new line is created, and on the table chat too but not on the table message.


I repeat if a already send a message to the person with messages.app when i use applescript the sms was sent.


It's only when I don't send a message before that the applescript doesn't


anybody know who I can contact to apple to help to resole this problem ?

thank for your help!

message by applescript

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.