Hallo zusammen,
ich brauch unbedingt eine Image Search Funktion.
Warum auch immer funktioniert die Imagesearch Autoit funktion bei mir nicht.
Habe probeweise Bilder auf dem Desktop genommen nichts funktioniert,
also bin ich auf Autohotkey umgestiegen ( weil ich mich da erinnere, dass ich mal ein Click auf Image Bot erstellt habe)...
Wie auch immer den Code habe ich zum laufen gebracht. Jetzt möchte ich aber, dass AHK das in einem Spiel umsetzt...
CoordMode Pixel ; Interprets the coordinates below as relative to the screen rather than the active window.
Loop
{
if (BreakLoop = 1)
break
ImageSearch, FoundX, FoundY, 417, 192, 1198, 652, *Trans0xEA00F6 C:\BOAT\AHK\transO.png
if (ErrorLevel = 2)
MsgBox Could not conduct the search.
else if (ErrorLevel = 1)
MsgBox Icon could not be found on the screen.
else
DllCall("SetCursorPos", "int", FoundX+25, "int", FoundY+5)
;MsgBox The icon was found at %FoundX%x%FoundY%
Sleep 500
}
Esc::
BreakLoop = 1
return
Das Problem bei der Sache ist:
Wenn ich aus dem Spiel raustab, es aber noch (ausgegraut) zusehen ist, dann funktioniert der Bot. Er scoped quasi die Monster ab auf die ich klicken mag, aber sobald ich aktiv in das Spiel reintabbe, bzw ich einmal Aktiv ins Fenster clicke, dann findet er die monster nicht mehr.
Is das Problem bei AHK oder hat das Spiel vielleicht eine Art Schutz/Anticheat?