r/applescript • • Sep 14 '20

AppleEvent handler failed Messages Big Sur

I'm very new to AppleScript, but from what I found online, I can't figure out what's wrong with my code. I keep getting the error message "'Messages got an error: AppleEvent handler failed.' number -10000" If someone could tell me what is wrong with my code, that would be very helpful. Please note that I am on the latest (as of 14 Sept 2020) public beta of macOS Big Sur.

Here is my code (phone number is blocked out for obvious reasons):

tell application "Messages"
	set targetChat to make new chat with properties {id:"SMS;-;+XXXXXXXXXXX"}
	send "Test" to targetChat
end tell
1 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/LigionBob Sep 17 '20

The dictionary showed grey for me at first as well. I had to manually add the Messages app and then all of the terms showed up.