I'm new with AHK and I have a problem that I'm sure its stupid to solve but I didn't found how to
So I want to be able to use a macro if the checkbox is checked, this is working, but I added an Hotkey function who edit the macro.
Here,
Code: Select all
SendInput {m[1] "{" m[2] "} Down}
Code: Select all
Gui, -Sysmenu
Gui, Add, GroupBox, x190 y39 w180 h110 , Others
Gui, Add, CheckBox, x195 y102 w90 h16 vReload gReload, Reload Cancel
Gui, Add, Hotkey, x290 y102 w40 h20 vReloadk gReloadk
Gui, Add, Button, x503 y5 w100 h30 gClose, Close
Gui, Show, x157 y151 h275 w610, test
Return
Reload:
Gui, Submit, NoHide
Return
Reloadk:
Gui, Submit, NoHide
Return
Close:
ExitApp
#If (Reload = 1)
CapsLock::
Gui, Submit, NoHide
RegExMatch(Reloadk,"O)([\^+!]+|)(.*)", m)
Loop
{
if not GetKeyState("CapsLock","P")
break
SendInput {Space Down}
Sleep 020
SendInput {Space Up}
Sleep 047
SendInput {m[1] "{" m[2] "} Down}
Sleep 016
SendInput {Space Down}
Sleep 030
SendInput {m[1] "{" m[2] "} Up}
Sleep 031
SendInput {Space Up}
Sleep 020
}
return