AutoIt
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compile_Both=y ;ist notwendig
#AutoIt3Wrapper_UseX64=y ;ist notwendig
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include "ImageSearch.au3"
Global $fenster
Global $active = 0
HotKeySet("p", "checkForImage")
MsgBox(0,"Hinweis","ändert den File zum suchen und drück die Taste 'p' zum starten")
global $y = 0, $x = 0 ;rückgabewerte für die Bildposition (sollten global sein!)
$file = 'C:\Users\ich\Pictures\Test1_0001%.bmp' ;passt hier den dateipfad bzw die Datei an bmp geht am besten
checkForImage()
Func checkForImage()
MsgBox(0,"Wir nehmen",$file)
Local $search = _ImageSearchArea($file,1,0,0, @DesktopWidth, @DesktopHeight, $x, $y, 0,0)
MsgBox(0,"Bildschirmgröße",@desktopwidth & " " & @desktopHeight)
;local $search = _ImageSearch($file, 1, $x, $y, 0) ; 900, 80, $x, $y, 0)
If $search = 1 Then
MsgBox(0, "Bild gefunden auf:", "x: " & $x & " y: " & $y)
MouseMove($x, $y, 10)
EndIf
MsgBox(0,"Suchergebniss 1= gefunden 0= nicht gefunden",$search)
EndFunc
while 1
sleep(200)
WEnd
Alles anzeigen