Code: Select all
Gui, Font, s12
Gui, Add, Text, x20, Press your Hotkey below:
Gui, Add, Hotkey, w200 vHKV gLabel
Gui, Add, Checkbox, x20 vActive gActiveHotkeyG, Active Hotkey
Gui, Show, w240 h120, `t
return
toggle := 0
ActiveHotkeyG:
toggle := !toggle
if (toggle) {
GuiControl, disable, HKV
GuiControl, disable, Hotkey
SetTimer, Script, 1
} else {
GuiControl, enable, HKV
GuiControl, enable, Hotkey
SetTimer, Script, Off
}
return
Script:
if (Active) {
Label:
if HKV in +,^,!,+^,+!,^!,+^!
return
if (savedHK) {
Hotkey, %savedHK%, Label1, Off
}
if (HKV = "") {
savedHK =
return
}
if (StrLen(HKV)) {
Hotkey, %HKV%, Label1, 1
savedHK := HKV
}
return
Label1:
MsgBox, %savedHK%
return
}
return
Esc::ExitApp
GuiClose:
ExitApp