This suddenly stopped working. It's been maybe a month since I last ran it but it's been working fine for over a year.
The macro is a simple "Send iMessage to xxxxxxx"
I've also tried using "Send SMS to xxxxxxx"
Both macros now give me a generic error message:
Message not sent to any recipients. Macro
"Trying" cancelled while executing Send iMessage to "xxxxx").
iMessage does launch successfully.
I've tried this on MacOS 12.6 and also the Ventura beta RC1.
Keyboard Maestro has the necessary accessibility permissions. I don't think anything has changed on my MacOS 12.6 machine besides the update from 12.5 to 12.6.
It's possible that the fix may cause problems for some existing uses.
Messages must be running (launched should be ok).
Check the action and see if the popup menu offers the recipient. If it does, selecting the recipient may resolve the issue.
The problem is, the old method used something akin to
participant "Fred"
and Messages’ AppleScript will sometimes return a completely different participant in response to that. So instead Keyboard Maestro now searches for a participant that matches the name, but that may mean it cannot find some participants that it previously could. But on the other hand it should mean it never finds a recipient that it should not!
On top of that the Messages’ AppleScript changed significantly when Apple changed from the old Mac version to the iOS-style version which makes it hard (actually impossible) to write AppleScript that works properly on both, and so I have to detect the version (and I'm uncertain as to the exact version of macOS that change happened).
Unfortunately, it is very difficult to debug the AppleScript and depends highly on both the macOS version and the Messages database. I am happy to try to work with anyone to resolve the issue, but it is quite painful to do so it will require a lot of back and forth to get it figured out. If you are willing, email me (Stairways Software: Contact Us).
I should've reported back. The problem was that I was manually typing in the phone number in KM, which did work before. The proper way to do things now is to select a contact instead, so you have to create a contact for the number you want to send a text to, if it doesn't already exist.