0

尽管我的游戏鼠标 Logitech G502 Hero 的 Lua 脚本在 Windows 桌面或我尝试的每个应用程序或游戏中都能正常工作,但它们在 Battlefield 和 Origin 应用程序上都不能工作。自定义宏工作,但脚本不工作。

有任何想法吗?或其他人有同样的问题?

谢谢!埃马努伊·菲利波

这是我尝试过但不起作用的简单 Lua 脚本的示例。

EnablePrimaryMouseButtonEvents(true)

function OnEvent(event, arg)
        if IsMouseButtonPressed(3)then
            repeat  
                if IsMouseButtonPressed(1) then
                    repeat
                        MoveMouseRelative(0,5)
                        Sleep(33)
                    until not IsMouseButtonPressed(1)
                end             
            until not IsMouseButtonPressed(3)
        end     
end
4

1 回答 1

0

您忘记插入Sleep

EnablePrimaryMouseButtonEvents(true)

function OnEvent(event, arg)
    Sleep(20)
    if IsMouseButtonPressed(3)then
        repeat  
            if IsMouseButtonPressed(1) then
                repeat
                    MoveMouseRelative(0,5)
                    Sleep(33)
                until not IsMouseButtonPressed(1)
            end             
        until not IsMouseButtonPressed(3)
    end     
end
于 2020-12-30T12:59:24.943 回答