Help with hotkey on GUI

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
ositoMalvado
Posts: 183
Joined: 24 Dec 2019, 12:02
Contact:

Help with hotkey on GUI

Post by ositoMalvado » 27 Sep 2022, 12:50

Hi guys, i have an issue here..
I just want to get LETTERS or NUMBERS, not modifiers, not SHIFT/CTRL/ALT or SHIFT+CTRL/SHIFT+ALT or SHIFT+ALT+CTRL.

Code: Select all

Gui 1:New
Gui 1:Add, Hotkey,Limit128 x5 y5 w100 vKEY_HS, .   ;here, the  limit is not working
Gui 1:Show,xCenter yCenter
Return



GuiClose:
GuiEscape:
ExitApp
Last edited by gregster on 27 Sep 2022, 13:06, edited 1 time in total.
Reason: Topic moved from 'Scripts and Functions'.
My WEB some useful stuff

User avatar
mikeyww
Posts: 27082
Joined: 09 Sep 2014, 18:38

Re: Help with hotkey on GUI

Post by mikeyww » 27 Sep 2022, 17:15

Code: Select all

Gui, Font, s10
Gui, Add, Hotkey, w230 vhk gGo
Gui, Show,, Hotkey

#IfWinActive Hotkey ahk_class AutoHotkeyGUI
LShift::
RShift::
LCtrl::
RCtrl::
LAlt::
RAlt::Return
#IfWinActive

Go:
MsgBox, 64, Hotkey, %hk%
Return
Or:

Code: Select all

Gui, Font, s10
Gui, Add, Hotkey, w230 vhk gGO Limit190
Gui, Show,, Hotkey
Return

Go:
If hk is not alnum
 Return
If (hk = "")
 Return
MsgBox, 64, Hotkey, %hk%
Return

Post Reply

Return to “Ask for Help (v1)”