0dium

ImageSearch Error

2 posts in this topic

Hi everyone,
I'm sorry if that post is not meant to be where it should be but I am new so I apologise in advance for the mistake I'd make.
Here's my problem :
I followed the instruction of that video : https://www.youtube.com/watch?v=Hy-va-155HY

and reproduced quite the same code :

#include <ImageSearch_64_bit\ImageSearch.au3>

$x = 0
$y = 0

$nomPerso = "Vespertiliones"
$picture = "test.png"

If WinExists($nomPerso) And $nomPerso <> "" Then
        sleep(200)
        WinSetState($nomPerso,"",@SW_MINIMIZE)
        WinSetState($nomPerso,"",@SW_RESTORE)
        WinActivate($nomPerso)
   do
      $result = _ImageSearch($picture,1,$x,$y,0,0)
      ; _ImageSearch($findImage, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transparency = 0)
      ConsoleWrite($result)
   Until $result = 1;
   If $result = 1 Then

      MouseMove($x,$y,50)
   Else
      MsgBox($MB_SYSTEMMODAL,"MSG","End")
   EndIf
Else
   MsgBox($MB_SYSTEMMODAL, "", "Window does not exist")
EndIf

And the fact is that if I delete the " #RequireAdmin " that the dev is telling us to remove, I get the error :
 

+>@OSArch=X64 @AutoItX64=0 therefore using x32 ImageSearch DLL
DllCall Error=1+>@OSArch=X64 @AutoItX64=0 therefore using x32 ImageSearch DLL

Otherwise it just executes but does absolutely nothing...
Would you please help me fix that issue ?
Thanks in advance !

- 0dium

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

For whoever sees this post, the files linked below work and I finally found what I was looking for.

 

 

 

ImageSearchDLLwithHBmp.zip

Edited by 0dium

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