Jump to content

Recommended Posts

Posted (edited)

So I was testing out the image search and when I tried to "Compile" and do a "Run" and I keep getting this error:

Line 1 (File "C:\Users\Mystogan\Desktop\ImageSearch.. \testing.aug"):

#include <ImageSearch.au3>

Error: Error opening the file.

--------------------------------------------------

The code executes perfectly when it's in edit mode.

#include <ImageSearch.au3>
#include <GDIPlus.au3>
Func Test()
    $fileA = @ScriptDir & "\recyclingBin.png"
    _GDIPlus_Startup()

    $hImageA = _GDIPlus_ImageLoadFromFile($fileA) ;this is the occupy icon
    $hBitmapA = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImageA)

    $x = 0
    $y = 0

    $result = _ImageSearch($hBitmapA, 1, $x, $y, 20, 0)
    If $result > 0 Then
        MouseMove($x, $y)
        Sleep(500)
        MouseClick($MOUSE_CLICK_PRIMARY, $x, $y, 2)
    EndIf
EndFunc

 

Edited by aa2zz6
For the Beta Version

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...