我怎样才能做到这一点,以便当按下鼠标按钮 4 时它将停止脚本工作,基本上是一个终止开关
我想知道如何做到这一点,以便当按下鼠标按钮 4 时它会停止或添加很长的休息时间。基本上是一个终止开关,可以禁用自动答题器工作
function OnEvent(event, arg)
--OutputLogMessage("Event: "..event.." Arg: "..arg.."\n")
if event == "MOUSE_BUTTON_PRESSED" and arg == 5 then
repeat
PressAndReleaseMouseButton(1)
Sleep(math.random(40, 135))
until not IsMouseButtonPressed(5)
end
end
I am Wondering how to make it so when mouse button 4 is pressed it stops or adds a very long rest. basically a kill switch that disables the auto clicker from working
function OnEvent(event, arg)
--OutputLogMessage("Event: "..event.." Arg: "..arg.."\n")
if event == "MOUSE_BUTTON_PRESSED" and arg == 5 then
repeat
PressAndReleaseMouseButton(1)
Sleep(math.random(40, 135))
until not IsMouseButtonPressed(5)
end
end
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Lua中的
until
定义了repeat-until循环的退出条件。尝试替换
为
until
in Lua defines exit condition of the repeat-until loop.Try to replace
with
试试这个!
MBTN 7 将成为您的交换机
Try this!
MBTN 7 ll be ur switch