Logitech G HUB 脚本

如何使得当我按住左 Alt 键和左鼠标时,它只会按住“L”键,当我释放左 Alt 键时,它又回到自动点击脚本

谢谢。

EnablePrimaryMouseButtonEvents(true);

function OnEvent(event, arg)
    if IsMouseButtonPressed(1) then
        repeat
            PressKey("L")
            Sleep(math.random(15, 45))
            ReleaseKey("L")
            Sleep(math.random(15, 45))
        until not IsMouseButtonPressed(1)
    end
end
点赞
用户1847592
用户1847592
启用主鼠标按键事件(truefunction OnEvent(event, arg)
   if event == "MOUSE_BUTTON_PRESSED" and arg == 1 then
      repeat
         PressKey("L")
         Sleep(math.random(15, 45))
         while IsModifierPressed("lalt") do
            Sleep(10)
         end
         ReleaseKey("L")
         Sleep(math.random(15, 45))
      until not IsMouseButtonPressed(1)
   end
end
2020-06-03 22:21:59