Logitech G HUB脚本

问题描述 投票:-1回答:1

我如何做到这一点,所以当我按住鼠标左键并按住“ L”键,然后放开鼠标左键时,它将返回到自动单击脚本

谢谢。

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
lua logitech logitech-gaming-software
1个回答
0
投票
EnablePrimaryMouseButtonEvents(true)

function 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
© www.soinside.com 2019 - 2024. All rights reserved.