r/applescript • • May 05 '24
Can't give accessibility control to script exported as application
I'm trying to get a script that toggles natural scroll to run as an application that I can double click on my desktop. I found the following script and it works when I run it in the Script Editor. My problem is that when I export it as an application it no longer works. I get an error that the script is not allowed assistive access (-1719).
I have allowed it under Privacy > Accessibility, however, when I run the script it toggles off. I'm not sure why that is happening. I can quit the settings, re-open, and it remains toggled on, but as soon as I run the script it toggles itself off.
Is this a known bug with scripts? Is there a way I can get around this?
edit: One workaround I found was to enable the Script menu bar icon in the Script Editor settings. I also disabled the Computer scripts so it's a quick way to access and toggle the script. It works and does the job, but I would still like to figure out why the exported application isn't able to keep the toggle whereas the Script Menu and Script Editor are able to stay toggled on.
View all comments
1
u/[deleted] Oct 18 '24
Signing the app with an identity will fix the issue