How can I have a fixed order of the menu-extras?

Solution 1:

You can hold command while drag and drop it to change the order. I don't know it will remember the order or not though.

Solution 2:

In your system preferences if you remove a menu item for whichever program is on there, and then put it back, it will go on the end of the line (left). So you can remove them and then put them all back in the order you want them. Not exactly and elegant solution but it works.

Solution 3:

Edit:

As it turns out, disabling resume upon login is enough.


With Applescript, this is a nice solution.

set theAppList to {{name:"Growl", vis:false}, {name:"Caffeine", vis:false}, {name:"Boom", vis:false}, {name:"Shimo", vis:false}, {name:"Twitter", vis:false}}
set theDelay to 0.5

repeat with currentApp in theAppList
    tell application (name of currentApp) to launch
    delay theDelay
    tell application "Finder" to set visible of process (name of currentApp) to (vis of currentApp)
end repeat

Important Note

You need to disable resume upon login for this script to work. ("Reopen windows when logging back in").

This can be done permanently with one line in Terminal.

How to implement the script

  1. Open AppleScript Editor.app
  2. Paste Script above and customize to your use.
  3. Save as Application enter image description here
  4. Right-Click on the created application and navigate to .../Contents/Info.plist It will open in Xcode.
  5. Menubar -> Editor -> Add Item
  6. Select: Application is agent (UI Element): YES and save. enter image description here
  7. Add the script to the Login Items in the System Preferences.
  8. Remove all the Apps that are used in the script from the Login Items.