I've created a script which uninstalls an application I've created. However, as you may know, in macOS Mojave the system requests the user's permission to allow said script to control System Events. If the user click "Don't allow", the script can't be run and the system won't request the user's permission for that app ever again.
Is there a way to detect if the user has clicked Don't Allow so that, next time the script/app is opened, the user is given instructions on how to allow it to control System Events? (Or even better, request his permission again).