Hallo.
Ich würde gerne Werte (hier im Beispiel die X und Y Koordinate der Maus) in echtzeit im GUI anzeigen lassen; ähnlich wie beim Window Info Tool.
Jedoch bekomme ich es nicht hin, dass die Inputboxen durch die Verzögerungen beim erstellen / entfernen wie verrückt blinken.
Ich hoffe ihr könnt mir helfen.
Hier der Code:
[autoit]
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 301, 86, 283, 201)
$Input1 = GUICtrlCreateInput("", 136, 12, 121, 21)
GUICtrlSetState(-1, $GUI_DISABLE)
$Label1 = GUICtrlCreateLabel("Mousepos X", 32, 16, 63, 17)
$Input2 = GUICtrlCreateInput("", 136, 44, 121, 21)
GUICtrlSetState(-1, $GUI_DISABLE)
$Label2 = GUICtrlCreateLabel("Mousepos Y", 32, 48, 63, 17)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
$mousepos = MouseGetPos()
GUICtrlDelete ($Input1)
GUICtrlDelete ($Input2)
$Input1 = GUICtrlCreateInput("" & $mousepos[0] & "", 136, 12, 121, 21)
GUICtrlSetState(-1, $GUI_DISABLE)
$Input2 = GUICtrlCreateInput("" & $mousepos[1] & "", 136, 44, 121, 21)
GUICtrlSetState(-1, $GUI_DISABLE)
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd