Hi BOSSnier,
oder so, da wird das Fenster auch noch mit einbezogen (so eine Art Erweiterung ;)) (nicht getestet)
[autoit]Func _MouseIsInArea($iYPoint, $iXPoint, $iYLenght, $iXLenght, $hWnd = -1)
Opt("MouseCoordMode", 1)
Global $OnhWnd = False, $aMPos = MouseGetPos()
If $OnhWnd = False And $aMPos[0] >= $iYPoint And $aMPos[0] <= $iYPoint + $iYLenght And $aMPos[1] >= $iXPoint And $aMPos[1] <= $iXPoint + $iXLenght Then
Return True
$OnhWnd = True
EndIf
If $OnhWnd = True And $hWnd <> -1 Then
Opt("MouseCoordMode", 2)
Global $aMPos = MouseGetPos(), $ahWndPos = WinGetPos($hWnd)
If $aMPos[0] >= $ahWndPos[0] And $aMPos[0] <= $ahWndPos[0] + $ahWndPos[2] And $aMPos[1] >= $ahWndPos[1] And $aMPos[1] <= $ahWndPos[1] + $ahWndPos[3] Then
Return True
EndIf
Else
$OnhWnd = False
Return False
EndIf
EndFunc ;==>_MouseIsInArea