Hallo ich hoffe jmd von euch kann mir helfen
Ich habe in den AutoIt Beispielen ein Script gefunden, welches die Koordinaten der Maus anzeigt. Ich wollte dieses umschreiben, dass es auch die aktuelle Farbe des Pixels anzeigt ebenfalls anzeigt, und diese Werte in eine .Ini-Datei speichert, dass ich diese mit einem andere Script aufrufen kann (das andere script funktioniert).
Leider funktioniert dies nicht wirklich. Ich hoffe jmd von euch kann mir helfen.
Danke schon mal im vorraus
Spoiler anzeigen
#include <GUIConstantsEx.au3>
Opt('MustDeclareVars', 1)
Global $x, $y, $var, $var, $b
HotKeySet("{DEL}","Write")
Example()
Func Example()
Local $msg
HotKeySet("{Esc}", "GetPos")
GUICreate("Press Esc to Get Pos", 400, 400)
$x = GUICtrlCreateLabel("0", 10, 10, 50)
$y = GUICtrlCreateLabel("0", 10, 30, 50)
$var = GUICtrlCreateLabel("0", 10, 50, 50)
GUISetState()
Do
$msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE
EndFunc
Func GetPos()
Local $a, $b
$a = GUIGetCursorInfo()
GUICtrlSetData($x, $a[0])
GUICtrlSetData($y, $a[1])
$b = PixelGetColor( $x, $y)
GUICtrlSetData( $var , $b)
EndFunc
func Write()
IniWrite("Konfig.ini", "Koordinaten","x",$x)
IniWrite("Konfig.ini", "Koordinaten","y",$y)
EndFunc