Sign in to follow this  
Followers 0
Dicemaster Slayer

Keyboard shortcuts for menu items?

2 posts in this topic

Recently I downloaded a program elsewhere called Numerimal ( that says it was written in AutoIt v3. Basically the program takes any base number and converts it to another base of user's choosing...

The program does have a menu at the top of its GUI consisting of your basic file, options, and help menus. When you drop down a menu, most of the items in those menus show "CTRL+N" or some other shortcut aligned on the right of the menu.

I'd like to implement shortcuts for menu items in some of the programs I'm working on now, but I don't know how to get the shortcuts aligned on the menu like that.

So basically, how do I do that? :)

Share this post

Link to post
Share on other sites

add some spaces?

But to get the shortcuts to work, here is an example:

$GUI = GUICreate("Test")
$menu = GUICtrlCreateMenu("&Menu1")
$menuitem1 = GUICtrlCreateMenuItem("Close        Ctrl+1", $menu)
While 1
$msg = GUIGetMsg()
HotKeySet("^1", "setup")
If $msg = $menuitem1 then 
Func Setup()
$msg = $menuitem1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0