Lua简单鼠标新闻宏

时间:2019-04-11 13:15:21

标签: lua logitech-gaming-software

我想要在我按左键时自动按左键,直到我释放它///我收到错误尝试调用upvalue'mouse_event'(nil值)的错误 我可以以某种方式执行此操作,还是可以通过左键单击启动键盘宏而不是鼠标单击来执行此操作?

local mouse_event = mouse_event

if IsMouseButtonPressed(1)then

    repeat

        for i = 1,100000000000,1 do /*2 secs leftclick*/
            mouse_event(MOUSEEVENTF_LEFTDOWN) 
            sleep(50)
            mouse_event(MOUSEEVENTF_LEFTUP)
        end  

    until not IsMouseButtonPressed(1)

end

尝试调用升值'mouse_event'(nil值)时出错

0 个答案:

没有答案