
[英]How to get this logitech lua script to move my mouse left, then to the right and keep on repeating that until mouse button 1 is no longer pressed
[英]Make that script only work while right mouse is pressed
请有人可以让这个脚本只在按下鼠标右键时工作? 谢谢!!
这是下面的代码:
--This game needs to match the proper X-axis jitter
X = 0 --X-axis jitter,The higher the value, the more applicable it is to C8 and Evo guns
Y = 4 --Y-axis down,This is matched with the x-axis adjustment
sleep = 14 --At the moment, I think 15 milliseconds is the best
function OnEvent(event, arg)
EnablePrimaryMouseButtonEvents(true)
if (event == "MOUSE_BUTTON_PRESSED" and arg == 2) then
A = true
ClearLog()
OutputLogMessage("On\n")
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
A = false
ClearLog()
OutputLogMessage("Off\n")
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and A==true) then
repeat
MoveMouseRelative(X, Y)
X = -X --crux
Sleep(sleep)
until not IsMouseButtonPressed(1)
end
end
谢谢你!!!!!!
--This game needs to match the proper X-axis jitter
X = 0 --X-axis jitter,The higher the value, the more applicable it is to C8 and Evo guns
Y = 4 --Y-axis down,This is matched with the x-axis adjustment
sleep = 14 --At the moment, I think 15 milliseconds is the best
function OnEvent(event, arg)
EnablePrimaryMouseButtonEvents(true)
if event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsMouseButtonPressed(3) then
repeat
MoveMouseRelative(X, Y)
X = -X --crux
Sleep(sleep)
until not IsMouseButtonPressed(1) or not IsMouseButtonPressed(3)
end
end
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.