如何在 Logitech G Hub 上随机化 xy 运动
我是初学者,我正在尝试在Logitech Ghub中制作宏。 我设法编程了所有内容,但是我随机移动。 是否可以将随机移动添加到此宏?
我在许多地方进行了搜索,但没有找到与我的问题相似的东西。
我希望他们随机移动,而与脚本中的移动不一样。
谢谢你!
function OnEvent(event, arg)
if event == "MOUSE_BUTTON_PRESSED" and arg == 3 then
PressKey("lshift")
MoveMouseTo(34650, 26299)
PressAndReleaseMouseButton(3)
Sleep(math.random(13, 30))
MoveMouseTo(34650,30854)
PressAndReleaseMouseButton(3)
Sleep(math.random(13, 30))
MoveMouseTo(32755,30854)
PressAndReleaseMouseButton(3)
Sleep(math.random(13, 30))
MoveMouseTo(30860,30794)
PressAndReleaseMouseButton(3)
Sleep(math.random(13, 30))
MoveMouseTo(30911,26360)
PressAndReleaseMouseButton(3)
Sleep(math.random(13, 30))
MoveMouseTo(30911,21865)
PressAndReleaseMouseButton(3)
Sleep(math.random(13, 30))
MoveMouseTo(32780,21805)
PressAndReleaseMouseButton(3)
Sleep(math.random(13, 30))
MoveMouseTo(34650,21926)
PressAndReleaseMouseButton(3)
ReleaseKey("lshift")
end
end
I'm a beginner and I'm trying to make a macro in Logitech GHub.
I managed to program everything, but I randomly movements .
Is it possible to add random moves to this macro?
I searched in many places and didn't find anything similar to my question.
I want them to move randomly and not the same as in the script.
Thank you!
function OnEvent(event, arg)
if event == "MOUSE_BUTTON_PRESSED" and arg == 3 then
PressKey("lshift")
MoveMouseTo(34650, 26299)
PressAndReleaseMouseButton(3)
Sleep(math.random(13, 30))
MoveMouseTo(34650,30854)
PressAndReleaseMouseButton(3)
Sleep(math.random(13, 30))
MoveMouseTo(32755,30854)
PressAndReleaseMouseButton(3)
Sleep(math.random(13, 30))
MoveMouseTo(30860,30794)
PressAndReleaseMouseButton(3)
Sleep(math.random(13, 30))
MoveMouseTo(30911,26360)
PressAndReleaseMouseButton(3)
Sleep(math.random(13, 30))
MoveMouseTo(30911,21865)
PressAndReleaseMouseButton(3)
Sleep(math.random(13, 30))
MoveMouseTo(32780,21805)
PressAndReleaseMouseButton(3)
Sleep(math.random(13, 30))
MoveMouseTo(34650,21926)
PressAndReleaseMouseButton(3)
ReleaseKey("lshift")
end
end
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论