There were two syntax errors
#1 the {} brackets are the wrong group symbol for the body. The return line handles this.Code:Mbutton:: IfWinActive, ahk_id %WowWinId1% ControlClick, Pos, ahk_id %WowWinId2%, , RIGHT IfWinActive, ahk_id %WowWinId2% ControlClick, Pos, ahk_id %WowWinId1%, , RIGHT RETURN
#2 there is a BLANK optional argument before the right click.
Connect With Us