The mouse hook monitors mouse clicks for the purpose of activating mouse hotkeys and facilitating hotstrings. It is not supported under Windows 95/98/Me because those operating systems require a different type of hook that must reside in a DLL file.
-ahk help file

Ok, but i tried anyways. Here's the code:
; Author: jgpaiva
;
; Script Function: replace double-right click by middle click
;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
rbutton::
keywait,rbutton,T0.1
if(errorlevel != 0){
Send,{rbutton down}
keywait,rbutton
Send,{rbutton up}
return
}
keywait,rbutton,D T0.1
if(errorlevel = 0)
Send,{mbutton}
else
Send,{rbutton}
return
f11::exitapp
I recommend you keep that last line, so that you can close the script by pressing F11, in case it goes wrong (and takes your right-click away). It should work well (at least, it does here).
To modify the timeout for the double-click, change the "0.1" to something larger or smaller.
ps: This is actually fun to play with!

[edit] removed a debug tooltip [/edit]