AutoHotKey – Portable Drive Menu

21/02/2009

I’m a big fan of portable applications and particularly the work driven by PortableApps.com. The PortableApps Menu has been undergoing a revamp for some time now to work towards a number of enhancements and in the mean time I’ve taken up using a branch of this known as Geek Menu. Unfortunately they are all quite slow as I have a huge number of portable applications on my portable hard drive.

I usually have a small number of applications I use regularly and so I actually want a fast loading light menu for automatic loading and then I load Geek Menu from that should I need access to lots of applications or ones that I use infrequently.

I’ve created a basic little application menu using AutoHotKey that is driven from a simple INI file menu system (that you manually edit) to fill this need. When run it sits in the system tray and when you click on it it displays a set of menu items (including sub menus) and executes the item associated with it using the path for it in the INI file.

There are a few variables in the initialise section that specify the name of the application, the INI file that defines the menu (which is convenient to store in the same folder as the menu script/executable and the icon file for the application.

The INI file has a “Tray” section which defines the root content of the tray item’s context menu. Each item is specified by “Item#” in numeric order. Each item specified will either have an entry in the same section (making it an item for execution) or a section of the same name (indicating it is a sub-menu).

This produces a menu system with two sub menus (one for utilities and one for tools) each with two items and a help item on the root menu. This configuration file specifies all paths in relation to the root of the drive it is stored on. You can tailor this INI file to your needs and even the menu system itself by modifying the script to what you want – just recompile it with the AutoHotKey compilation tool and you’ve got it.