
EnablePrimaryMouseButtonEvents(true)
open = false
function OnEvent(event, arg)
if (event == "MOUSE_BUTTON_PRESSED" and arg == 6) then
open = not open
if open then
OutputLogMessage("开启\n")
else
OutputLogMessage("关闭\n")
end
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and open) then
local pressed = true
repeat
Sleep(10)
if not IsMouseButtonPressed(1) then
pressed = false
else
PressMouseButton(1)
end
until not pressed
end
end
由于一直有友友要连点的代码,今天有时间就敲出来了,开启方式还是老样子按下鼠标切换dip的按键切换是否开启,而后按下左键就以每秒100下的速度连点
注:不是每个鼠标都有切换鼠标dpi的按键,需要改按键的修改第4行的数字6为1-6之间的数字,一般来说是1鼠标左键,2鼠标右键,3鼠标侧1,4鼠标侧2;以此类推慢慢试换成侧键就能平替
连点的速度修改是第15行的Sleep(x),速度为每秒1000/下,按照需求自行调节