Jump to content

Image Search Dll crash

Recommended Posts


HI All,


I'm a new to autoit, so please excuse me if this is the wrong place or ...

I have a simple code I wrote using the ImageSearch UDF :

#include <ImageSearch.au3>

HotKeySet("p", "checkForImage")

global $y = 0, $x = 0

Local $string
If(checkForImage() = True) then
    $string = "Found it!"
    $string = "Opps !"

MsgBox($MB_SYSTEMMODAL, "ImageSearch", $string, 10)

Func checkForImage()
    Local $x, $y
    local $search = _Imagesearcharea(@ScriptDir & "\A.bmp", 1, 0, 0, @DesktopWidth, @DesktopHeight, $x, $y, 100)
    ;local $search = _ImageSearch('A.bmp', 0, $x, $y, 0)
    If $search = 1 Then
        MouseMove($x, $y, 10)
        Return TRUE
    Return False
EndFunc   ;==>checkForImage


The issue is as follows:

When I run this on a Win10 64Bit all is OK.

When I run it on Win7 32Bit the script just crashes,

And Yes, I had replaced the dll from 64Bit to 32Bit whn I exported my code between the PCs.

Any Ideas?


Thanks in advance.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now