Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function OnEvent(event, arg)
- if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
- PressKey("lalt")
- Sleep(10)
- repeat
- PressAndReleaseKey("tab")
- ReturnCode = SleepMouseButtonBreak(320, 4)
- until not IsMouseButtonPressed(4) or ReturnCode == _MOUSE_BUTTON_BREAK
- ReleaseKey("lalt")
- end
- end
- _TIME_BREAK = 0
- _MOUSE_BUTTON_BREAK = 1
- function SleepMouseButtonBreak(time, mb)
- StartTime = GetRunningTime()
- while (GetRunningTime() - StartTime) < time do
- if not IsMouseButtonPressed(mb) then
- return _MOUSE_BUTTON_BREAK
- end
- Sleep(10)
- end
- return _TIME_BREAK
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement