How to use Script Editor to re-authorize a balky AppleScript in macOS Catalina and later

If you’ve kicked around with a Mac for more than a few years and you read Macworld, you almost certainly have an AppleScript or seven that you rely on for certain custom features. I wrote a very simple script many years ago to launch and quit various apps when I start work for the day and finish up. This arrival and departure script prevents some apps from continuing to collect data or download material while I’m away. (I wrote up this script 11 years ago for Macworld!)

If you run AppleScript, you may have run afoul of macOS 10.15 Catalina or later’s new requirements for permission in running apps and system utilities. When you first upgraded to Catalina or later, or whenever you install a new app, you may have to agree to let it control certain parts of your system. That includes sending commands to the Finder (a simple click for permission) or using screen-recording features (permission granted via the Security & Privacy preference pane’s Privacy tab).

With an AppleScript that’s saved as an app to run without requiring Script Editor, you may have seen a prompt—as I did—that you need to grant permission to the script for it to carry out some part of its actions. But when you click to provide permission, nothing happens.

The solution is to use Script Editor—just briefly. Open Script Editor (found in Applications > Utilities) and then open your AppleScript app. Run the app within Script Editor and grant any permissions asked for. Now you can re-save the script as an app:

  1. Hold down the Option key and choose File > Save As.
  2. Select Application from the File Format menu if it isn’t already selected.
  3. Choose a location and potentially a new name to avoid overwriting the original.
  4. Click Save.

Now when you run the script, it should work without a hitch. If you still have problems, check the Security & Privacy preference pane’s Privacy tab under Automation. If your AppleScript app is there with an unchecked box, check it!

https://www.macworld.com/wp-content/uploads/2021/07/mac911-applescript-permission.png?resize=300%2C264&quality=50&strip=all 300w, https://www.macworld.com/wp-content/uploads/2021/07/mac911-applescript-permission.png?resize=768%2C675&quality=50&strip=all 768w, https://www.macworld.com/wp-content/uploads/2021/07/mac911-applescript-permission.png?resize=1200%2C1055&quality=50&strip=all 1200w" sizes="(max-width: 1338px) 100vw, 1338px" />
You may need to also enable apps, like the Finder, in the Automation view for your AppleScript app.

Ask Mac 911

We’ve compiled a list of the questions we get asked most frequently, along with answers and links to columns: read our super FAQ to see if your question is covered. If not, we’re always looking for new problems to solve! Email yours to mac911@macworld.com, including screen captures as appropriate and whether you want your full name used. Not every question will be answered, we don’t reply to email, and we cannot provide direct troubleshooting advice.

Subscribe to Applenews247.Com Newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>