Mac OS X 10.4 (Tiger): No more application-specific Scripts menus in Mail and Safari

Posted by Pierre Igot in: Macintosh
May 17th, 2005 • 5:58 am

In Mac OS X 10.4, for reasons that they have not disclosed, but that might have to do with trying to avoid the confusion generated by multiple Scripts menu, Apple decided to do away with the application-specific Scripts menu in Mail and Safari.

This doesn’t mean that you can no longer have application-specific scripts that are only accessible when you are within the application in question. But now, the only place where you can have application-specific scripts is in a section of the system-wide Scripts menu on the right-hand side of the menu bar.

First, obviously, you need to make this system-wide Scripts menu visible, which it isn’t by default. This is done using the AppleScript Utility application that’s located inside the “AppleScript” folder on your startup Mac OS X volume.

Once this is done, you need to understand that this system-wide Scripts menu is built using the scripts located in three different places:

  1. the “Scripts” folder in your main library folder (at the root level of your startup volume)
  2. the “Scripts” folder in your home folder’s library folder
  3. the folder bearing the name of the current application that is located inside the “Applications” folder inside your home library’s “Scripts” folder

The key item here is 3. While 1 and 2 are “static” sections of the Scripts menu that remain the same regardless of which application you are currently using, the scripts referred to in 3 actually change from application to application. They appear in a special section of the system-wide Scripts menu that has a heading consisting of one of those permanently disabled menu items that Apple uses as text labels in various menus in Mac OS X. The heading consists of the name of the application followed by “Scripts“. Below that heading you’ll find the scripts that are in the “Mail” folder inside the “Applications” folder inside your home library’s “Scripts” folder.

When you are in Mail, for example, the application-specific section of the system-wide Scripts menu will have a disabled “Mail Scripts” as its heading and then a series of menu items that consists of the scripts located inside the ~/Library/Scripts/Applications/Mail/ folder in alphabetical order.

When you are in Safari, the application-specific section of the system-wide Scripts menu will have a disabled “Safari Scripts” as its heading and then a series of menu items that consists of the scripts located inside the ~/Library/Scripts/Applications/Safari/ folder in alphabetical order.

And so on. This is nothing new. The architecture has been available in Mac OS X since Jaguar. But now it’s the only option!

For people used to using the application-specific Script menus, it definitely takes some getting used to. This section is at the bottom of the Scripts menu by default, but you can use the AppleScript Utility to change this and force Mac OS X to put the application-specific scripts at the top instead.

I am not convinced that this change is a good thing. For one thing, the benefit of having application-specific Scripts menus was that there was a clear visual distinction between application-specific scripts and system-wide scripts. Now all we have is a system-wide menu whose contents change depending on which application you are in. It’s a strange idea — even if it has the side-benefit of adding a application-specific Scripts menu section even for applications that do not have a built-in Scripts menu.

In addition, there is one major drawback. When applications such as Mail and Safari had their own Scripts menu, that Scripts menu was considered part of the application’s menu commands. It was then easy to assign an application-specific keyboard shortcut to a script in that menu, through the “Keyboard Shortcuts” section in the “Keyboard & Mouse” preference pane in System Preferences.

The system-wide Scripts menu, however, is not part of a specific application. So you can no longer create an application-specific keyboard shortcut for a script in that menu! And, as far as I can tell, you cannot even assign a system-wide keyboard shortcut to a script in that menu…

I tried two things. First, I tried to create a system-wide keyboard shortcut in the “Keyboard Shortcuts” section in the “Keyboard & Mouse” preference pane in System Preferences.

When that didn’t work, I then figured that menus on the right-hand side of the menu bar normally belong to the background process called “SystemUIServer”. This process is an application that can be found in /System/Library/CoreServices/. I tried creating a keyboard shortcut in the “Keyboard Shortcuts” section in the “Keyboard & Mouse” preference pane in System Preferences for this specific application, which you can select by choosing “Other…” in the menu that lets you choose the application you want to create shortcut for, and then navigating to /System/Library/CoreServices/ and selecting the application called “SystemUIServer”. I created a shortcut for a specific script that I had for Safari.

After that, I force-quit SystemUIServer with Activity Monitor, in order to force Mac OS X to restart the background application and load the keyboard shortcuts in the process. This worked — at least visually. When in Safari, the keyboard shortcut that I had defined for that particular script did appear next to the script in the application-specific section of the Scripts menu. But it still wouldn’t work as a keyboard shortcut.

Even if it worked, it would still be a major architectural drawback to have to define shortcuts that are system-wide — or SystemUIServer-wide, which amounts to the same thing — when you only need these shortcuts for a specific application.

But unfortunately, that’s the choice that Apple has made.

Fortunately, third-party applications can still have their own application-specific Scripts menu if they choose to. This makes things even more confusing, of course, because you then have an even greater number of different places where you can have scripts — but at least the option is still there.

For Safari and Mail users, however, the damage is done, and it appears to be irreversible at this stage.


3 Responses to “Mac OS X 10.4 (Tiger): No more application-specific Scripts menus in Mail and Safari”

  1. ssp says:

    I thought this change was a good one and the Script Menu is the way to go. It saves programmers work, gives the script menu in the same location for any application, a consistent place to to save the scripts and gives a consistent UI.

    I think the script menus in some applications, e.g. iTunes, still work. You may just have to put the correct scripts folder at the correct place.

    As for the keyboard equivalents… yep that can suck. Perhaps worth filing a bug report, although it may be an architecturally tricky thing to solve.

  2. Pierre Igot says:

    The inability to use app-specific keyboard shortcuts is a major drawback.

  3. Daniel Jalkut says:

    I’m a little late to this dicussion, but I thought I would mention that my shareware utility, FastScripts, fills the void left by this change perfectly.

    FastScripts puts a script menu in the top-right corner, like Apple’s utility, but also lets you assign global and application-specific shortcuts to any of them.

    http://www.red-sweater.com/fastscripts/index.html

    Hope this helps!

    Daniel

Leave a Reply

Comments are closed.