罗技鼠标宏吧 关注:310贴子:488
  • 2回复贴,共1

鼠标可以启动循环但凡是无法结束,代码发出来了,大佬们帮参考一

只看楼主收藏回复

function OnEvent(event, arg)
--OutputLogMessage("Event: "..event.." Arg: "..arg.."")
if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
isRunning = true
while isRunning do
MoveMouseTo(32371, 8289)
Sleep(20)
MoveMouseTo(39490, 12615)
Sleep(20)
MoveMouseTo(44049, 16532)
Sleep(20)
MoveMouseTo(45944, 23591)
Sleep(20)
MoveMouseTo(46584, 38483)
Sleep(20)
MoveMouseTo(41872, 44312)
Sleep(20)
MoveMouseTo(36519, 48001)
Sleep(20)
MoveMouseTo(29400, 49276)
Sleep(20)
MoveMouseTo(18849, 45997)
Sleep(20)
MoveMouseTo(9962, 33382)
Sleep(20)
MoveMouseTo(8374, 19037)
Sleep(20)
MoveMouseTo(11627, 5738)
Sleep(20)
MoveMouseTo(17619, 5738)
Sleep(20)
MoveMouseTo(25149, 7742)
Sleep(20)
MoveMouseTo(40463, 15758)
Sleep(20)
MoveMouseTo(45303, 26824)
Sleep(20)
MoveMouseTo(41616, 39758)
Sleep(20)
MoveMouseTo(31423, 46863)
Sleep(20)
MoveMouseTo(20308, 40624)
Sleep(20)
MoveMouseTo(16006, 23181)
Sleep(20)
MoveMouseTo(19873, 13936)
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then
isRunning = false
end
end
end


IP属地:云南1楼2024-08-16 15:38回复
    没用过while 可以试试repeat


    IP属地:湖北来自Android客户端2楼2024-12-16 23:07
    回复
      把下面的if写到第一个if去elseif


      IP属地:湖南来自Android客户端3楼2024-12-29 00:02
      回复