编辑
2025-07-31
笔记
00
js
macro = "your_macro_name" -- 替换为录制的宏名称(纯英文) kaiguan = "ctrl" state = 0 function OnEvent(event, arg) if event == "PROFILE_ACTIVATED" then while true do if IsModifierPressed(kaiguan) and state == 0 then state = 1 PlayMacro(macro) while IsModifierPressed(kaiguan) do -- 等待按键释放 end elseif IsModifierPressed(kaiguan) and state == 1 then state = 0 AbortMacro() while IsModifierPressed(kaiguan) do -- 等待按键释放 end end Sleep(10) -- 防止CPU占用过高 end end end

本文作者:松轩(^U^)

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

Document