Q> AHK 添加规则在 MMB 期间禁用 RMouse 和 LMouse 单击并按住

Q> AHK Add a Rule Disable RMouse and LMouse During MMB click and hold

有没有办法将此规则添加到此脚本中

r::
send {Mbutton down}
KeyWait, r
send {Mbutton Up}
return

MMB是sketchup的默认导航轨道我想把它换成R 我做到了

现在我想添加一条规则,当我按住并按下 mmb 时,它会自动禁用鼠标左键和鼠标右键 这样它就不会激活平移或上下文菜单

提前致谢

$r::                            ; The $ prefix forces the keyboard hook to be used to implement this hotkey.
send {Mbutton down}
Disable_Left_Right_Button = 1   ; creates the variable "Disable_Left_Right_Button" and sets its value to 1 (= true)
KeyWait, r                      ; waits until the key is released
send {Mbutton Up}
Disable_Left_Right_Button = 0   ; sets the value of the variable to 0 (= false)
return


;define the context in which the mouse buttons should be inactive:

#If (Disable_Left_Right_Button = 1) ; Code below is only valid if the value of the variable is true. 
                                    ; That means that if it's true, the mouse buttons are not going to work.
    Lbutton::
    RButton::
     return

#If                                 ; turns off the context sensitivity