HotKeySet("{ESC}", "_Quit")
While 1
If WinActive("[CLASS:OperaWindowClass]") Then
Do
$wPos = WinGetPos("[CLASS:OperaWindowClass]")
$wSize = WinGetClientSize("[CLASS:OperaWindowClass]")
$mPos = MouseGetPos()
$MinX = $wPos[0]
$MaxX = $wPos[0] + $wSize[0]
$MinY = $wPos[1]
$MaxY = $wPos[1] + $wSize[1]
If ($mPos[0] > $MinX) And ($mPos[0] < $MaxX) Then
If ($mPos[1] > $MinY) And ($mPos[1] < $MaxY) Then
MouseMove(-1, -1)
EndIf
EndIf
Sleep(10)
Until WinActive("[CLASS:OperaWindowClass]") = 0
EndIf
Sleep(10)
WEnd
Func _Quit()
Exit
EndFunc