Right-Click to QuickArchive in Outlook

The following AutoHotkey code makes right-clicking a shortcut for QuickArchiving in Outlook, but (helpfully) only if a message is being right-clicked. Otherwise, there is normal right-clicking behavior.


#IfWinActive ahk_class rctrl_renwnd32
RButton::
MouseGetPos, , , , pane
If pane = SUPERGRID1
Send {Click}!q
else
Click right
return
#IfWinActive