羅技lua實(shí)現(xiàn)增量壓槍
EnablePrimaryMouseButtonEvents(true)
args = false
function OnEvent(event, arg)
? ? if (event == "MOUSE_BUTTON_PRESSED" and arg == 1) then
? ? ? ? up = 0.5
? ? ? ? add = 0.05
? ? ? ? repeat
? ? ? ? ? ? Sleep(1)
? ? ? ? ? ? MoveMouseRelative(0, math.floor(up))
? ? ? ? ? ? Sleep(1)
? ? ? ? ? ? up = up + add
? ? ? ? until --OutputLogMessage("num=%s\n", ?math.floor(up))
? ? ? ? not IsMouseButtonPressed(3)
? ? end
end
標(biāo)簽: