Peter Bergloff
Peter Bergloff

Reputation: 1

Abort script with same command as started with Lua in Logitech G HUB

I'm learning Lua, and set up a script in the Logitech software when I hit mouse button 9. I would like to abort this script when hitting the button again while running, but after multiple attempts, I haven't figured out how to. This is simply what I have skipping over the long string:

function OnEvent(event, arg)
    if event == "MOUSE_BUTTON_PRESSED" and arg == 9 then

--Skipping over string 

    end
end

I've tried setting global flags and a few other solutions but I can't seem to get it right.

Upvotes: 0

Views: 32

Answers (0)

Related Questions