Script Menu

This is one of the under utililized and powerful features of the Mac OS that all users should try. Just the mention of AppleScript intimidates many. Don't fear, you won't have to learn anything except where to put them.

What follows is from apple.com Script Menu instruction pages with some small modifications.

The Script Menu is a system-wide utility for organizing and executing PERL, Shell, or AppleScript scripts. When activated, it displays a small script icon in the upper right of the menu bar. The contents of designated script folders is displayed as a list of script names on the menu. Selecting a menu item will execute the related script file.

Installing/Removing the Script Menu

In Panther: To install the Script Menu, launch the Install Script Menu application located in the AppleScript folder in the Applications folder. To remove the Script Menu, launch the Remove Script Menu application located in the AppleScript folder in the Applications folder.

In Jaguar: Open the AppleScript folder in the Mac OS X 10.2 Applications folder. Drag the “Script Menu.menu” icon to the right side of the Finder menu bar and let go. If you want to remove the Script Menu, drag its icon from the menu bar while holding down the Command key.

SCRIPT FOLDERS

The Script Menu organizes the display of scripts found in three locations on the startup drive.

Local Scripts Folder - Scripts placed in the Scripts folder in the Library folder (HD:Library:Scripts) at the top level of the startup disk are considered part of the Local Domain of the computer and as such are available to every user. By default, Mac OS X includes a number of example scripts in the Local Scripts folder. You can modify this list by moving scripts in or out of this folder.

User Scripts Folder - Scripts installed by the current user in the Scripts Folder in the Library folder of the Home directory (HD:Users:User Home:Library:Scripts) are considered part of the User Domain of the computer and as such are only available to the current user. The User Script Folder is not a part of the default system install and must be created by the user. These scripts will be available at all times to only the current user.

Application Scripts Folder - For convienience and organization, the Script Menu can display scripts for the frontmost application at the bottom section of the menu. To enable this feature, create a folder named “Applications” in the User Scripts Folder (HD:Users:User Home:Library:Scripts). Within the Applications folder, create a folder for each application for which you want to display a set of scripts or download a script applet you can run to automatically enable frontmost application script display. It will create a folder in HD:Users:User Home:Library:Scripts:Applications for you to put scripts for that application. This would be a good one to place in the User Scripts Folder. Each of the created folders must be named the exact name of its targeted application. Place scripts for each targeted application in its corresponding folder.
NOTE: The script folders listed above can contain alias files to script files located elsewhere on the computer.

1. Open Scripts Folder - selecting this menu item will open the User Scripts folder.

2. Hide Library Scripts - selecting this menu item will disable the viewing of the scripts in the Local Scripts Folder. Click this menu item on the illustration to see the Script Menu adjust accordingly.

3. Local Scripts - these scripts are pre-installed in the Local Scripts Folder.

4. User Scripts - these scripts are installed by the user in the User Scripts Folder. which are in the ~/Library/Scripts

5. Current Application Scripts - these scripts are those installed for the frontmost application which are in the ~/Library/Scripts/Applications folder. The contents of this section changes to match whatever application is in the foreground.

Special Key Commands
• Hold down the Option key when selecting a menu item to open the script in the Script Editor application.

• Hold down the Shift key when selecting a menu item to reveal the script file in the Finder.

• Select a sub-folder menu triangle to open the folder in the Finder.

Once you understand how the menu works and where things belong, go here for some scripts for common Apple applications.

 


ACTIVATING UI SCRIPTING - this needed for only the scripts which ask for it or if you want to create some of your own.

The GUI Scripting architecture is based upon the Mac OS X accessibility frameworks that provide alternative methods of querying and controlling the interfaces of the OS and applications.

By default, the accessibility frameworks are disabled. An administrative user can enable them by clicking the checkbox labeled "Enable access for assistive devices" in the Universal Access System Preference pane and entering their password in the forthcoming authentication dialog.

You can learn more about GUI Scripting here.

 

Some of my favorite scripts.

Info Scripts:

Font Sampler - Check this one out! It will give you a sampling of all the fonts on your system in TextEdit which you can then print.

iPhoto:

Show Image File - This will take you to the picture file in the finder.

Assign Keywords for Last Import - Allows you to add Keywords to all the photos included in the last import you did.

iTunes:

Playlist names to comments - this script will go through your library and add the playlists each song is included in to the comments field of the song. It is available, along with many other iTunes scripts at Doug's Applescripts for iTunes.

Mail:

Crazy Message Text - Just try it.

Count Messages in All Mailboxes - Will do just that.

Safari:

email the Current URL - This is a script that is quite handy and should have been included with Safari.

 

Back to Top

 

2005-2009 Jeff Overton -

OSX IndexMacOptions Home