Try
RightMax!
This one catches the rightclicks! It slows down single rightclicks, though...
Skrommel
;RightMax.ahk
; Doublerightclick in a window to maximize or restore it
;Skrommel @ 2009
#NoEnv
#SingleInstance,Force
SetWinDelay,0
CoordMode,Mouse,Screen
SendMode Input
RegRead,dblclickspeed,HKEY_CURRENT_USER,Control Panel\Mouse,DoubleClickSpeed
SysGet,dblclickx,36
SysGet,dblclicky,37
time:=A_TickCount
Return
$RButton::
oldmx:=mx
oldmy:=my
oldmwin:=mwin
oldmctrl:=mctrl
MouseGetPos,mx,my,mwin,mctrl
oldtime:=time
time:=A_TickCount
SetTimer,RIGHT,% "-" dblclickspeed
If (mx<oldmx-dblclickx Or mx>oldmx+dblclickx Or my<oldmy-dblclicky Or my>oldmy+dblclicky Or time-oldtime>dblclickspeed Or mwin<>oldmwin)
Return
SetTimer,RIGHT,Off
WinGet,minmax,MinMax,ahk_id %mwin%
If minmax=0
WinMaximize,ahk_id %mwin%
Else
WinRestore,ahk_id %mwin%
Return
RIGHT:
Click,Right
Return