Where apps hide your files
AppleScripts go in ~/Library/Scripts for your account or /Library/Scripts for everyone, and the Script menu lists both once you switch it on in Script Editor. Here are the folders, the setting and the other places scripts live.
Scripts you want in the Script menu go in the Scripts folder of a Library:
~/Library/Scripts
That is the folder for your account. On the Mac used for this guide it existed and was empty; if yours is missing, create it in Finder or with mkdir -p ~/Library/Scripts. A second folder is shared by every user of the Mac:
/Library/Scripts
Only an administrator can change that one. On the Mac used for this guide it holds Apple's own folders: ColorSync, Folder Action Scripts, Folder Actions, Printing Scripts, Script Editor Scripts, UI Element Scripts and VoiceOver. Leave those as they are.
~/Library is hidden in Finder. Choose Go > Go to Folder (⇧⌘G), type ~/Library/Scripts and press Return. Or from Terminal:
open ~/Library/Scripts
The Script menu is a menu-bar item that lists the scripts in those folders and runs one when you click it. It was switched off on the Mac used for this guide (defaults read com.apple.scriptmenu ScriptMenuEnabled printed 0). To switch it on, open Script Editor (in /System/Applications/Utilities), choose Script Editor > Settings (⌘,), click General, and tick Show Script menu in menu bar. Apple's guide also tells you to make sure Show Computer scripts is ticked; Apple's scripting guide says that box is what includes the computer-level scripts in /Library/Scripts. The same pane lets you put app-specific scripts at the top or bottom of the menu. On releases before Ventura, the menu item reads Preferences rather than Settings.
The menu is run by a small background app, /System/Library/CoreServices/Script Menu.app, which you never need to open yourself.
The Script menu lists your ~/Library/Scripts items and, when Show Computer scripts is on, the contents of /Library/Scripts. Its own commands, taken from the app's resource strings, include Open Scripts Folder, Open User Scripts Folder and Open Computer Scripts Folder, depending on what is shown. Choosing one opens that folder in Finder, which is the quickest way back to it.
Apple's scripting guide says the menu can run compiled scripts (.scpt, or the bundle form .scptd) and scripts saved as apps, as well as UNIX shell scripts and Automator workflows. Save your AppleScript as a compiled script or app from Script Editor rather than as plain .applescript text. Subfolders show as submenus, which is how Apple's own folders in /Library/Scripts appear.
The Script menu supports a section that appears only while a particular app is frontmost. The menu's strings include a %@ Scripts heading and an Open %@ Scripts Folder command for it. Apple's Mac Automation Scripting Guide puts those scripts in a folder named after the app inside an Applications folder, in either Scripts folder:
~/Library/Scripts/Applications/<App Name>
/Library/Scripts/Applications/<App Name>
Neither exists by default, and none was present on the Mac used for this guide, so the naming could not be tested here. If a subfolder does not produce its own section, use the Open ... Scripts Folder command the menu shows while that app is in front, which opens the folder it expects.
To make one yourself, this creates a new, empty folder and nothing else:
mkdir -p ~/Library/Scripts/Applications/Finder
These are separate from the Script menu, and easy to mix up with it.
/Library/Scripts/Script Editor Scripts holds Apple's snippet scripts, in folders such as Tell Blocks, Conditionals and Error Handlers. Apple's Script Editor guide tells you to add a script by copying it into this folder; as a subfolder of /Library/Scripts it shows in the Script menu when Show Computer scripts is on. Changing it needs an administrator password.Folder Action Scripts folder in one of the Library locations above. The Mac used for this guide has Apple's four helper scripts in /Library/Scripts/Folder Actions and the samples in /Library/Scripts/Folder Action Scripts.~/Library/Script Libraries. That folder does not exist by default and none was present on the Mac used for this guide.~/Library/Application Scripts/<bundle identifier>. Mail's "Run AppleScript" rule action, for example, looks in ~/Library/Application Scripts/com.apple.mail. Many apps have a folder there, empty until you add something.The first time a script controls another app, macOS asks whether to allow it, and the answer is stored under System Settings > Privacy & Security > Automation. If a script that worked before now does nothing, look there before you edit the script.
Scripts are ordinary files, so copying ~/Library/Scripts (and ~/Library/Script Libraries, if you use it) to the same place on a new Mac is enough. Time Machine includes both. Keep a copy of any script that took time to write somewhere you look every day, such as Documents. If you copy the folder by hand rather than with Migration Assistant, switch the Script menu on again on the new Mac, since that setting lives in a preferences file, not in the folder.
Your scripts sit in ~/Library, which Finder searches and Spotlight results leave out, and a compiled .scpt has no readable text for a content search to match.
If you remember part of the script's name, typing it into Everywhere finds the file wherever it sits, whether in ~/Library/Scripts, in a folder of its own or on your Desktop. Typing .scpt or .applescript lists every script on the Mac, and ⌘↵ reveals the one you pick in Finder. It matches names only, not the code inside a script. Scripts in ~/Library/Scripts are covered without Full Disk Access, while those under Documents or Desktop need it.
Your scripts go in ~/Library/Scripts. Scripts for every user go in /Library/Scripts, which needs an administrator password to change.
Open Script Editor, choose Script Editor > Settings, click General and tick Show Script menu in menu bar. Tick Show Computer scripts too if you want the shared scripts in /Library/Scripts listed.
Apple's Mac Automation Scripting Guide uses a folder named after the app inside ~/Library/Scripts/Applications (or /Library/Scripts/Applications for all users). They show in the Script menu only while that app is in front.
Finder hides it. Choose Go > Go to Folder, type ~/Library/Scripts and press Return, or run open ~/Library/Scripts in Terminal.
Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Version 2.20.3 · macOS 13+ · 4.7 MB · notarised