Page 2 of 2

Re: Error "Not authorized to send Apple events to Messages"

PostPosted: Sun May 24, 2020 9:05 am
by matt (support)
Did you see and follow the steps in my post above?

Re: Error "Not authorized to send Apple events to Messages"

PostPosted: Sun May 24, 2020 10:11 am
by MarcoGT
Yes, sorry, forgot to mention, but no popup (of course I replaced Spotify with Messages)

Re: Error "Not authorized to send Apple events to Messages"

PostPosted: Mon May 25, 2020 12:35 pm
by matt (support)
Okay, I'm not sure what else to suggest but I do believe we have this working better in the next release of Indigo (7.4.2 or 7.5.0). I don't yet have an ETA as to when it will be available, unfortunately.

Re: Error "Not authorized to send Apple events to Messages"

PostPosted: Mon Jul 06, 2020 11:43 pm
by ppespepe
Hello,

Does anybody has been able to make this work? I'm using Mojave but getting the following when trying to send a message:

Jul 7, 2020 at 12:36:21 AM
Action Group Send iMessage Test
iMessage Plugin Debug sendImsg() method called.
iMessage Plugin Debug sendImsg() buddyHandle:ppespepe@icloud.com and theMessage:Testosterona and use lastBuddy:False
iMessage Plugin Debug as_sendmessage() method called.
iMessage Plugin Debug Sending iMsg:Testosterona to Buddy/User:ppespepe@icloud.com
iMessage Plugin Debug A error of type :ScriptError occured. The longer message is :Not authorized to send Apple events to Messages.
iMessage Plugin Error An Error occured within the iMsg AppleScript component - ScriptError
iMessage Plugin Error The Error was :Not authorized to send Apple events to Messages. (-1743) app=u'Messages' range=103-105
iMessage Plugin Error Caught Exception:
Traceback (most recent call last):
File "plugin.py", line 1184, in sendiMsg
self.as_sendmessage(buddyHandle, theMessage)
File "plugin.py", line 462, in as_sendmessage
reply = my_ascript_from_string.run()
File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/applescript/__init__.py", line 90, in run
return self._unpackresult(*self._script.executeAndReturnError_(None))
File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/applescript/__init__.py", line 65, in _unpackresult
raise ScriptError(errorinfo)
ScriptError: Not authorized to send Apple events to Messages. (-1743) app=u'Messages' range=103-105

Any news so far? :D

PP

Re: Error "Not authorized to send Apple events to Messages"

PostPosted: Tue Jul 07, 2020 8:47 am
by matt (support)
Did you try the steps mentioned earlier in this thread? You'll want to replace "Spotify" with "Messages".

Re: Error "Not authorized to send Apple events to Messages"

PostPosted: Thu Jul 09, 2020 3:08 pm
by ppespepe
Hi Matt,

Yep... tried creating the script

Code: Select all
tell application "Messages"
end tell

Then running from an action group but no pop up... but the good news is, while I was typing this reply, I gave it another try with:

Code: Select all
tell application "Messages"
   set theBuddy to buddy "ppespepe@icloud.com" of service "iCloud"
   send "Hi there" to theBuddy
end tell

It gave me an error but opened the pop up... now it is working.

Did something similar with iTunes local control:

Code: Select all
tell application "iTunes"
   set sound volume to 40
   set EQ enabled to true
   play
end tell

And it worked as well in my Mojave. :)

Regards,

PP

Re: Error "Not authorized to send Apple events to Messages"

PostPosted: Thu Jul 09, 2020 3:56 pm
by jay (support)
Yeah, sorry, this was my bad. I discovered that you have to actually have the app do something before the workaround above works correctly. I was going to update the post (which I have now) but it just slipped my mind.

Re: Error "Not authorized to send Apple events to Messages"

PostPosted: Sun Jul 12, 2020 2:18 pm
by philipbasile
Awesome !
Worked.

Re: Error "Not authorized to send Apple events to Messages"

PostPosted: Wed Dec 23, 2020 3:08 pm
by matt (support)
Indigo 7.5 is now available and should avoid this macOS security snafu.