Applescript menu

The scripts menu

SiteTagger has a scripts menu that can be used to run applescripts. SiteTagger comes with a few default scripts and more can be added by placing scripts in ~/Library/Application Support/SiteTagger/Scripts/. You can reach this folder quickly by choosing “Open Scripts folder…” from the script menu. Scripts placed in this folder must have the “.scpt” file extension.

Running an applescript is as simple as selecting it from the scripts menu. You can also option-click a script to open it in Script Editor for editing. Shift-clicking on a script will reveal the script in the Finder.

Customizing the scripts menu

The scripts menu in SiteTagger allows for BBEdit-style name ordering. This lets you order the scripts menu based on your preference rather than alphabetically as is the default. The BBEdit naming convention is “xx)name of file”. The two “x” represent any characters. For instance, if you had three scripts named “A.scpt”, “B.scpt”, and “C.scpt” and you wanted the scripts to be displayed in reverse order, you could rename the scripts “01)C.scpt”, “02)B.scpt”, and “03)A.scpt”.

SiteTagger also includes the ability to set keyboard shortcuts for scripts. The keyboard shortcuts can be any single key that is not already used in another keyboard shortcut or function keys 1 through 8. To assign a keyboard shortcut to a script, append two underscores and a key name to the name of a script before the file extension. For example, if you had a file named “Shortcut.scpt” and wanted to assign it to the key “Y”, you would rename the file “ShortcutY.scpt”. You could then run that script by pressing Apple-Y. Alternatively, if you wanted to assign it to a function key, you could rename it “ShortcutF6.scpt”. The script would then run whenever you pressed the F6 function key.