Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Menu Creator - Easily build menus for your scripts


  • Please log in to reply
27 replies to this topic
Coco
  • Members
  • 697 posts
  • Last active: Oct 31 2015 07:26 PM
  • Joined: 27 Jul 2012
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

Main Window
Posted Image
Add/Edit Item window
Posted Image
Preview menu
Posted Image
Sample Output in Windows Notepad
Posted Image

Notes:
Use "PageUp" to move an item up and "PageDown" to move it down.

Latest Update:
October 22, 2012

Added "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 basis
Added 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 Creator
Download(Compiled): Menu Creator
Code
Spoiler


Coco
  • Members
  • 697 posts
  • Last active: Oct 31 2015 07:26 PM
  • Joined: 27 Jul 2012
Update: Added functionality to move item(s) up and down the ListView.(I forgot about this). Uploaded latest version and updated code above.

Coco
  • Members
  • 697 posts
  • Last active: Oct 31 2015 07:26 PM
  • Joined: 27 Jul 2012
Added "Quick Help", first post updated.

Coco
  • Members
  • 697 posts
  • Last active: Oct 31 2015 07:26 PM
  • Joined: 27 Jul 2012
Fixed output code not displaying the line breaks correctly. (changed `n to `r`n as suggested by maestrith)
Uploaded latest version and updated code above.

oldbrother
  • Members
  • 149 posts
  • Last active: Nov 09 2014 07:36 PM
  • Joined: 06 Jul 2005
Cool! But there are three download links, which is the latest one?
Thanks!!!

Coco
  • Members
  • 697 posts
  • Last active: Oct 31 2015 07:26 PM
  • Joined: 27 Jul 2012

Cool! But there are three download links, which is the latest one?
Thanks!!!


Hi, oldbrother. thanks
The topmost link, the one with the file comment: "Latest version"

Coco
  • Members
  • 697 posts
  • Last active: Oct 31 2015 07:26 PM
  • Joined: 27 Jul 2012
- 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.

Coco
  • Members
  • 697 posts
  • Last active: Oct 31 2015 07:26 PM
  • Joined: 27 Jul 2012
Updated post - Included code above.

Coco
  • Members
  • 697 posts
  • Last active: Oct 31 2015 07:26 PM
  • Joined: 27 Jul 2012
Update (October 22, 2012)
-Added insert in SciTe button(for SciTe4AutoHotkey users)
-Updated code and uploaded latest version

Coco
  • Members
  • 697 posts
  • Last active: Oct 31 2015 07:26 PM
  • Joined: 27 Jul 2012
Update:
-Changed download link. Used Dropbox instead. Copy in AHK.net can't seem to attach.

Guest10
  • Members
  • 1216 posts
  • Last active: Oct 30 2015 05:12 PM
  • Joined: 27 Oct 2012
I get this error message:
Error at line 39
The following variable name contains an illegal character:
"["Add"
The program will exit.

Could you help?

Coco
  • Members
  • 697 posts
  • Last active: Oct 31 2015 07:26 PM
  • Joined: 27 Jul 2012

I get this error message:
Error at line 39
The following variable name contains an illegal character:
"["Add"
The program will exit.

Could you help?


Hi Guest10, thank you for reporting, may I know what version of AutoHotkey are you using? This requires at least version 1.1(formerly known as AutoHotkey_L)

Guest10
  • Members
  • 1216 posts
  • Last active: Oct 30 2015 05:12 PM
  • Joined: 27 Oct 2012
Thanks, Coco! I am using Version 1.0.48.05 (I got this from Help menu). Can I SAFELY upgrade to L or 1.1 without any conflicts, problems, etc.?

Coco
  • Members
  • 697 posts
  • Last active: Oct 31 2015 07:26 PM
  • Joined: 27 Jul 2012
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. Posted Image

Guest10
  • Members
  • 1216 posts
  • Last active: Oct 30 2015 05:12 PM
  • Joined: 27 Oct 2012
Thanks very much for your informative reply! Posted Image