罗技⿏标宏-压lua脚本
local fireStatus = false --设置⼀个全局变量,控制是否启⽤该功能
--SetBacklightColor(0,0,255) --设置背光, 我的设备不⽀持,就注释掉了
EnablePrimaryMouseButtonEvents(true) --启动主键检测即⿏标左键(默认是不检测的)
function OnEvent(event, arg) --全部事件的监控
if (event == "MOUSE_BUTTON_PRESSED" and arg == 4 ) then --⽤4键来开启此功能
fireStatus = not fireStatus
--if(fireStatus) then
--SetBacklightColor(255,0,0)html实现用户注册登录代码
--else
--SetBacklightColor(0,0,255)
-
-end
end
if ( fireStatus == true and event == "MOUSE_BUTTON_PRESSED" and arg == 1 ) then --检测到⿏标左键按下
--while(IsMouseButtonPressed(1)) -- 当⿏标左键处于按下状态时执⾏下⾯代码 (不知什么原因,循环语句在我的游戏窗⼝上不起作⽤,就没有⽤循环控制) --do
MoveMouseRelative(0, 4) --⿏标指针相对位移
Sleep(80) --睡眠 (⽤循环做时睡眠函数不可去掉,否则代码执⾏过快,容易卡死,相当于死循环)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
MoveMouseRelative(0, 4)
Sleep(80)
--MoveMouseRelative(0, 50)
--end
end
end
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论