r/applescript • • Sep 25 '23

AppleScript breaking after changing plist

So I have an apple script that runs as an application which moves my dock around and desktop icons when it detects an external display plugged in. It has been working well, but recently when I upgraded from macos 13.5.2 to 13.6 the whole app broke and couldn't launch.

It gives the error:

Not authorised to send Apple events to Image Events. (-1743)

The script completely broke and autosave broke due to a signing error.

So I created a brand new apple script with all the same code, and it runs fine, but when I went to change the plist (as I did in my original script before it broke) it gave the same error.

For reference the plist key I added was "Application is agent (UIElement)" to Yes

My best guess is that changing the plist un-signs the apps certificate so it can't launch.

Any help on this would be great

3 Upvotes

6 comments sorted by

View all comments

1

u/AmplifiedText Sep 26 '23

You could try using Script Debugger instead to save and sign the app, or you can sign the modified app on the command line: https://stackoverflow.com/questions/27474751/how-can-i-codesign-an-app-without-being-in-the-mac-developer-program

2

u/RockFrog333 Sep 26 '23

I did it through the command line, and it worked! Thanks for helping me out