This code should do it, pasted from the script I'm currently making.
I have not tested this separately, but it should work:
Code:
#persistent
AeroFlipTime:=0.5 ;Time mouse has to hover at top left corner for switch to happen
SetTimer, hovercheck, 10
return
hovercheck:
CoordMode, Mouse, Screen
MouseGetPos, x, y
if ((x != lastx or y != lasty)&&x=0&&y=0&&!WinActive("ahk_class Flip3D"))
{
z:=-(AeroFlipTime*1000+1)
SetTimer, hovering, %z%
}
lastx := x
lasty := y
return
hovering:
CoordMode, Mouse, Screen
if (GetKeyState("LButton") || GetKeyState("RButton") || WinActive("ahk_class Flip3D"))
return
MouseGetPos, x, y
if(x!=0||y!=0)
return
Send ^#{Tab}
SetTimer, hovering, off
return
#IfWinActive, ahk_class Flip3D
Space::Enter
Left::Right
Right::Left
Down::Up
Up::Down
RButton::Esc
RWin::Esc
LWin::Esc
WheelUp::WheelDown
WheelDown::WheelUp
#if