Skip to content

Commit

Permalink
Removed unnecessary while loop
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaakDl authored and IsaakDl committed May 18, 2022
1 parent 008dd3c commit 0456aea
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions Mousemeeter.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,22 @@ Return
;Mouse-HOTKEYS
XButton1::
state := False
While GetKeyState("XButton1", "P") {
setHotkeyState(True)
Sleep 100
}
setHotkeyState(False)
setHotkeyState(True)
Return

XButton2::
state := False
While GetKeyState("XButton2", "P") {
setHotkeyState(True)
Sleep 100
}
setHotkeyState(False)
setHotkeyState(True)
Return

XButton1 Up::
setHotkeyState(False)
If (!state)
Send, {XButton1}
Return

XButton2 Up::
setHotkeyState(False)
If (!state)
Send, {XButton2}
Return
Expand Down

0 comments on commit 0456aea

Please sign in to comment.