Hey guys I recently started trying to write some simple Lua Scripts for Logitech GHUB. I finally got them working the way I like but I'm having troubles with this one. Instead of instantly stopping when I release Mouse5 it will continue to execute the script till the end. I want it however to immediately stop if I release Mouse 5. How do I do that?
function OnEvent(event, arg)
if event == "MOUSE_BUTTON_PRESSED" and arg == 5 then
repeat
Sleep(40)
PressMouseButton(1)
Sleep(1150)
ReleaseMouseButton(1)
until not IsMouseButtonPressed(5)
end
end
Thanks for your help :-)