-1

我怎样才能做到这一点,当我按住左 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
4

1 回答 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
于 2020-06-03T22:21:59.000 回答