Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

ImageSearch not working

$
0
0
Hi there, I've had a bunch of trouble with ImageSearch but currently my script isn't doing anything when I run it but exits a few seconds later with an exit code.

This is in the SciTE output.
>Exit code: -1073741819 Time: 8.149

This is my script:
[ autoit ]    ( ExpandCollapse - Popup )
#AutoIt3Wrapper_UseX64=n #Include HotKeySet("{NUMPAD2}", "Start") HotKeySet("{NUMPAD3}", "Stop") $X = 0 $Y = 0 While 1 Sleep(1) WEnd Func Start() $image_location = @ScriptDir & "\TestA.BMP" While 1 ; $Found = _ImageSearchArea($image_location,1,0,0,@DesktopWidth,@DesktopHeight,$X,$Y,100) $Found = _ImageSearch($image_location, 1, $X, $Y, 20) If $Found = 1 Then MsgBox(0, "Found it!", "The image was found.") MouseClick("left", $X, $Y, 2, 10) Else MsgBox(0, "Not Found", "The image was not found.") EndIf WEnd EndFunc Func Stop() exit 0 EndFunc

Any help would be appreciated.

Viewing all articles
Browse latest Browse all 12506

Trending Articles





<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>