Hallo,
ich hab mal eben eine kleine Funktion erstellt. Vielleicht kann es ja jemand gebrauchen
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 213, 69, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 128, 8, 75, 25, $WS_GROUP)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 8, 8, 97, 17)
$Label1 = GUICtrlCreateLabel("Label1", 8, 40, 36, 17)
$Radio1 = GUICtrlCreateRadio("Radio1", 88, 40, 113, 17)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If _IsPressedByMouse($Form1, $Button1) = True Then MsgBox(0, "", "Ja")
Case $Checkbox1
If _IsPressedByMouse($Form1, $Checkbox1) = True Then MsgBox(0, "", "Ja")
Case $Label1
If _IsPressedByMouse($Form1, $Label1) = True Then MsgBox(0, "", "Ja")
Case $Radio1
If _IsPressedByMouse($Form1, $Radio1) = True Then MsgBox(0, "", "Ja")
EndSwitch
WEnd
Func _IsPressedByMouse($GUIHandle, $ControlHandle)
$GCursoInfo = GUIGetCursorInfo($GUIHandle)
If IsArray($GCursoInfo) Then
If $ControlHandle = $GCursoInfo[4] Then
Return True
EndIf
Return False
Else
Return SetError(1)
EndIf
EndFunc ;==>_IsPressedByMouse