r/applescript • u/LigionBob • 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
View all comments
Show parent comment
1
u/cweirup Sep 17 '20
Interesting. Potentially my AppleScript environment is screwed up.
I tried to write a new Script against Messages. The app shows up in the Library list, but it's greyed out and it won't launch its Dictionary. It appears that I can write AppleScript against it, however, if I know what to write ahead of time.
Anyway, my bad. Thanks for the clarification.