如何使用PlayMacro()运行自动重复宏?

我正在使用以下脚本-

function OnEvent(event, arg)
    if event == "MOUSE_BUTTON_PRESSED" and arg == 4 then
        PlayMacro("macro")
    end
    if event == "MOUSE_BUTTON_RELEASED" and arg == 4 then
        AbortMacro()
    end
end

宏序列如下-

>按下LMB
>等待1400毫秒
>释放LMB
>等待250毫秒

虽然它按照我预期的工作和终止,但我无法发现在按下按钮4的同时重复它并在同时按下按钮4时中止序列的方法。有什么帮助吗?

点赞