The Scripts Menu
Introduction
The "Scripts" menu provides a way to make a script, or a document, launchable by menu. Smile's mechanism for the "Scripts" menu supports hierarchical menus, separation lines, and shortcuts.
Using the "Scripts" menu
The "Scripts" menu (the menu with the parchment Script icon) displays the scripts and text documents contained in the "User Scripts" folder. (The scripts contained in the "User scripts" folder are called user scripts.) Folders are listed as hierarchical menus. Selecting one of the menu items of the "Scripts" menu launches / opens the corresponding script / document.
Adding / Removing a menu item
To add or remove an item to / from the "Scripts" menu, add or remove the corresponding file to / from the "User Scripts" folder. You do not need to quit Smile, changes take effect immediately.
To add or remove a sub-menu, add or remove the corresponding folder from the "User scripts" folder. "Sclipts" and "Dialog" ("Developer" folder) are examples of folders of scripts, which can be copied to the "User scripts" to install a group of commands.
If the name of the folder begins with a space, it will not be displayed as a sub-menu. Instead, its contents will be displayed, separated from the rest of the menu by a separation line.
Naming a menu item - The shortcuts
If the name of a script of the "User scripts" folder ends with the slash character, followed by another character (for instance "/@"), the final character ("@" in the example) can be used, in combination with the Command key (
), as a keyboard shortcut for selecting the menu.
The shortcut is case-sensitive. If the final character of the name of the script is a low case character (for instance, "Just a Test /j"), the shortcut combination is simply 'Command' + 'key' (for instance,
J). If the final character is an uppercase character (for instance, "Just a Test /J"), the shortcut combination is 'Command' + 'Shift' + 'key' (for instance,
J).
If this shortcut is a figure ("0" ... "9"), you must use the numeric keypad to activate it. You can also use the
function keys
to activate such shortcuts.
Editing a user script
To edit/view a user script, choose its name in the "Scripts" menu while pressing the Option key down (
).
Of course, you can also use the standard procedure (choosing "Open" in the "File" menu) for opening scripts.
Default user scripts
Smile ships with a default "Scripts" menu containing several user scripts. For a complete description of those scripts, see
User Scripts
.
========================================================
Advanced
- The menu names follow the rules of Menu Manager. Use the reserved characters ("&","<", "(", "-", etc. ) only if you know what you are doing.
- The "Scripts" menu is updated the first time the user clicks in the menu bar after the "User scripts" folder has been modified. (A folder is not considered modified when one of its file gets renamed.)
- When a user script is running, its path name is available in the "user script file" property of Smile.