You can change the order of scripts in the menu or assign keyboard shortcuts to scripts by modifying the filenames of your scripts in the script folder.
By adding “number + closing parenthesis ())” at the head of the name, you can line up the files in numerical order. The part “number + )” won’t be shown in the menu.
| Filename | Show in the menu |
|---|---|
| 01)Open File.scpt | Open File |
A folder named “-” appears as a separator line in the menu. By adding “number + closing parenthesis ())” at the head of the folder name, you can put a separator between the menu items.
A file/folder whose name begins with the underscore “_” does not appear in the script menu. You can use it for setting files, library scripts, and so on.
A script placed in a folder in the scripts folder appears in a submenu.
By adding “dot (.) + modifier key + shortcut key” in front of the extension, you can assign a keyboard shortcut to the script.
| Notation | Equivalent key |
|---|---|
| ^ | Control |
| $ | Shift |
| ~ | Option |
| @ | Command |
| Filename | Show in the menu | Shortcut |
|---|---|---|
| Insert String.@e.scpt | Insert String | Command-E |
| 03)Insert Date.@~Y.scpt | Insert Date | Option-Shift-Command-Y |
CotEditor changes keyboard shortcut mapping dynamically to prioritize the scripts in the subfolder whose name is the same as the frontmost document’s syntax when the same keyboard shortcut is determined in multiple CotEditor scripts.