What do you use for macro submenus?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
picklepissjar
Posts: 20
Joined: 22 Oct 2022, 10:03

What do you use for macro submenus?

Post by picklepissjar » 12 Nov 2022, 19:46

Hi,
It's a very simple thing, but I was wondering how others were making submenu's in macros and if I could make improvements to mine. Like maybe you use gdip, or something instead of inputhook.
<-- an different example using Menu
Here is what I've been doing.

Code: Select all

	Insert::
	{ 
		SetNumlockState On
		IPH := InputHook("L1")
		IPH.KeyOpt("{ALL}", S E)
		IPH.Start()
		Gui, -Caption +Owner
		Gui, Font, s15
		Gui, Add, Text, cwhite, 7 ¦ ... `n8 ¦ ...`n9 ¦ . . .
		Gui, Color, Black
		Gui, Show, % "x" A_ScreenWidth // 1.2 " y" A_ScreenHeight // 1.44 
		IPH.Wait(5)
		SetNumlockState Off
		Gui, Destroy
		switch, IPH.Input
		{
			Case 7:
			...
			Case 8:
			.
			.
			.
		}
	}	
		
Aside from the limitations of inputhook (can't use some keys/mouse i.e. numpadkeys; which is why I toggle the numlockstate), I have no issues with it. Just curious what others do :D .

Return to “Ask for Help (v1)”