Menu Creator - Easily build menus for your scripts

This is a simple tool that allows you to build custom menus easily. Code is generated automatically and copied to clipboard for pasting. You can also preview the menu while working on it. Here are some screenshots:Requires AHK v. 1.1

To those who want to work with menus OOP style, check out my wrapper for the common AHK "Menu" commands + more

Latest Update:October 22, 2012Added "Insert in Scite" button. Users who are using SciTe4AutoHotkey should now be able to insert generated code directly into SciTe(at caret position)

Previous Updates:Added option to include target label in output - on a per item basisAdded option to include "Menu , [MenuName] , Show" or "Gui , Menu , [MenuName]" in output - By default Menu will be shown at mouse position. The user can choose to show Menu at specified "x" and "y" coordinates and they can also set the "CoordMode" to either "Window"(Default), "Screen" or "Client". - User can also choose to attach the menu as a menu bar to a GUI, just specify the GUI name(if any).Added option to allow users to set "spacing" format in output. (e.g. Space-Comma-Space , Comma-Space or Space-Comma). This allows the user to set the output to conform with their coding style.Added some alert notifications in case user inputs something invalid or forgot to input something that is required(e.g. Invalid character(s) for target label(s), etc.)Fixed bug when copying code to clipboard, some lines would duplicate.Fixed handling of "Environment Variables" when choosing an icon. Used "EnvGet" to retrieve actual text.Download(Script):Menu CreatorDownload(Compiled): Menu CreatorCode

Spoiler

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.SendMode Input ; Recommended for new scripts due to its superior speed and reliability.SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.#SingleInstance, force

MenuMsgHandler(param="Preview") {if (param == "Preview")MsgBox, 64, , This is a preview.if (param == "Quick Help")MsgBox, 0, Menu Creator - Quick Help,(LTrimUse "PageUp" and "PageDown" to move an item up and down the ListView.

When specifiying an item name in the Add/Edit Item window, ampersands(&) are treated as literal ampersands. Select the letter that you would like to underline from the "Underlined letter" DropDownList.

Duplicate "hotkeys" are allowed when creating menus, but for "Best Practices" purposes, a warning message is displayed every time a duplicate is found. Should you wish to create items sharing the same hotkeys, just edit those lines manually after you have copied and pasted the generated code. Same goes for underlined letters, but since it is useful for navigation, an option to allow same underlined letters is provided in the main window of the script.)}

- Added some new features/options. (See first post for the latest updates) - Fixed some issues and bugs. - Updated screenshots above - Uploaded latest version and removed older ones. I left the previous file just in case new bug(s) arise. - Removed code from first post due to Max limit in posting

Thanks to those who downloaded and tried the script. You should upgrade to the most recent version it has better options and previous bugs were fixed.

Included with the download/installation of the latest version are several copies of AutoHotkey.exe. AHK Unicode is advised for compatibility with future scripts and AHK ANSI for backward compatibility. There are numerous topics in the forum on how to keep several copies and have specific scripts run using specific version of Autohotkey.exe. You can even keep your current AHK. Research on the discussions regrading this so as to avoid conflicts with your current scripts. I will try to compile my code so that you can run it without troubles on compatibility. The latest AHK version provides backward compatibility, plus new features as well.