Hallo,
ich habe selber eine kleine Funktion erstellt, mit der man Linklabel Klicke richtig auswerten kann.
Wie kann ich genau die selbe Funktion machen, um doppelklicks abzufangen?
Also nur true und false returns.
Spoiler anzeigen
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.1.0 (beta)
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Test", 138, 52)
$Label1 = GUICtrlCreateLabel("Klick mich!", 40, 16, 55, 17)
GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
GUICtrlSetCursor(-1, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Label1
$LabelState = _Label_OnClick($Form1, $Label1)
If $LabelState = True Then
MsgBox(0, "", "Sie haben mich geklickt :P")
EndIf
EndSwitch
WEnd
Func _Label_OnClick($hWnd, $Control_Hwnd)
GUICtrlSetColor($Control_Hwnd, 0xE51251)
$Cursorinfo99 = GUIGetCursorInfo($hWnd)
If IsArray($Cursorinfo99) Then
While $Cursorinfo99[4] = $Control_Hwnd
$Cursorinfo99 = GUIGetCursorInfo($hWnd)
If Not $Cursorinfo99[2] Then
GUICtrlSetColor($Control_Hwnd, 0x0000E4)
Return True
ExitLoop
EndIf
Sleep(10)
WEnd
EndIf
GUICtrlSetColor($Control_Hwnd, 0x0000E4)
Return False
EndFunc ;==>_Label_OnClick