Unbenutze Farbe finden

  • 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)
    [autoit]

    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

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func ende ()
    Exit
    EndFunc

    [/autoit]
    Bild 2 Scanner (hir kommt error)
    [autoit]

    HotKeySet ("y","ende")
    Sleep (5000)
    ToolTip ("Start",0,0,"Script")
    $zahl = 1
    $inizahl = 1

    [/autoit] [autoit][/autoit] [autoit]

    $inix1 = IniRead ("Script","X","X1",0)
    $inix2 = IniRead ("Script","X","X2",0)
    $iniy1 = IniRead ("Script","Y","Y1",0)
    $iniy2 = IniRead ("Script","Y","Y2",0)

    [/autoit] [autoit][/autoit] [autoit]

    $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

    [/autoit] [autoit][/autoit] [autoit]

    Func ende ()
    Exit
    EndFunc

    [/autoit]

    besser gesagt es kommt kein error es schreibt nur keine farbe auf
    warum und was ist flasch ?

    2 Mal editiert, zuletzt von kloo (9. März 2009 um 21:57)

  • Nur eine kleine Info am Rande:

    Das Posen von Bots ist hier verboten. Schau bitte mal in dir Forenregeln.

    MfG

  • Naja meiner Meinung nach ist das hier ein totaler Quatsch was du erzählst, aber wenn du meinst. Man schreibt ja grundsätzlich immer nen Tooltip mit start Bot, egal was für sein Sinn das Script hat...
    Es wird 100% ein Bot, aber das lass ich mal deine Sache sein.

  • durch das graue im vordergrund des einen bildes können garkeine farben identisch sein, außer ich hab etwas heftig falsch verstanden O.o