Also ich will 2 bilder vergleichen und die farbe rausfinden die in bild 2 nicht vorkommt die in bild 1 drinne ist
Bild 1 scanner (geht ohne probleme)
HotKeySet ("y","ende")
Sleep (5000)
ToolTip ("Start",0,0,"Script")
$zahl = 1
$x1 = 8
$x2 = 148
$y1 = 39
$y2 = 179
While 1
If $x1 = $y1 Then
$x2 += 1
$x1 = 8
EndIf
If $x2 = $y2+1 Then
MsgBox (0,"","Fertig")
Exit
EndIf
$suche = PixelGetColor ($x1,$x2)
IniWrite ("farben.ini","farben",$zahl,"0x"&Hex ($suche,6))
$zahl +=1
$x1 += 1
WEnd
Func ende ()
Exit
EndFunc
Bild 2 Scanner (hir kommt error)
HotKeySet ("y","ende")
Sleep (5000)
ToolTip ("Start",0,0,"Script")
$zahl = 1
$inizahl = 1
$inix1 = IniRead ("Script","X","X1",0)
$inix2 = IniRead ("Script","X","X2",0)
$iniy1 = IniRead ("Script","Y","Y1",0)
$iniy2 = IniRead ("Script","Y","Y2",0)
$x1 = $inix1
$x2 = $inix2
$y1 = $iniy1
$y2 = $iniy2
While 1
Sleep (1)
$inifarbe = IniRead ("farben.ini","farben",$inizahl,0)
If $x1 = $y1 Then
$x2 += 1
$x1 = $inix1
EndIf
If $x2 = $y2+1 Then
$x1 = $inix1
$x2 = $inix2
$y1 = $iniy1
$y2 = $iniy2
$zahl = 1
$inizahl = 1
EndIf
If $inifarbe = 0 Then
MsgBox (0,"",@error)
Exit
EndIf
$suche = PixelGetColor($x1, $x2)
If $suche <> $inifarbe Then
$inisektion = IniReadSection("farben2.ini", "farben")
For $i = 1 To UBound($inisektion)
If $inisektion[$i][1] <> $suche Then
IniWrite("farben2.ini", "farben", $zahl, "0x" & Hex($suche, 6))
EndIf
Next
EndIf
$inizahl += 1
$zahl += 1
$x1 += 1
WEnd
Func ende ()
Exit
EndFunc
besser gesagt es kommt kein error es schreibt nur keine farbe auf
warum und was ist flasch ?