Jump to content
kangkeng

Image Search Library

Recommended Posts

ImageSearch.au3 not work under Windows 7 x64 if AutoIt3_x64.exe used!

ERROR

Line 40 ...ImageSearch.au3

if $result[0]="0" then return 0

if $result^ ERROR

Error: Subscript used with non-Array variable

If run under AutoIt3.exe - all ok!

I tried running it using autoit3 and autoit3_x64 on windows 7 rc, and got the aforementioned error in both cases. Any suggestions?

Share this post


Link to post
Share on other sites

Props to my man. Works great. I thought I was having problems, but I didn't notice that the image I was searching for had a semi-transparent background and was different everytime. Thankfully I was able to increase the threshold and it worked. Good work!

Share this post


Link to post
Share on other sites

ImageSearch.au3 not work under Windows 7 x64 if AutoIt3_x64.exe used!

ERROR

Line 40 ...ImageSearch.au3

if $result[0]="0" then return 0

if $result^ ERROR

Error: Subscript used with non-Array variable

If run under AutoIt3.exe - all ok!

I tried running it using autoit3 and autoit3_x64 on windows 7 rc, and got the aforementioned error in both cases. Any suggestions?

The variable $result is not an array. It is simply 1 or 0. I'm running Windows 7 RC x64 and AutoIt x64--no problems.

Try this:

if $result = 1 then
    msgbox(0,"Result","Found!")
else
   msgbox(0,"Result","Not Found!")
endif
Edited by ending

Share this post


Link to post
Share on other sites

Hey guys, the tool is great. I have a problem where in certain cases the image is found and it isn't in certain cases. I've created an ImageSearch() function that

calls the .dll every time. The arguments are a relative path such as /automation/Images. The problem that I have encountered is that sometimes this relative

path works and sometimes it doesn't. It there a way of knowing where the .dll is looking for the image???

Thanks in advance?

Share this post


Link to post
Share on other sites

Hello

I have 2 images (images in post) but this images change background color on mouse over event, my question how i can find images position if i don't know was mouse over event or not ?

Posted Image - without mouse over event

Posted Image - with mouse over event

i probaly change ImageSearch.au3 like on this post #551948, but scipt interrupt and ask me to and task.

tnx for help and sorry for noob question.

Share this post


Link to post
Share on other sites

Hey. Great library. I just made some chages, so i can search any HBitmap, too :D ( _WinAPI_LoadImage, _GDIPlus_BitmapCreateHBITMAPFromBitmap) :D

Posted Image ImageSearch.zip (659.4K) Number of downloads: Posted Image

//Edit: added speedshare mirror as requested by mortelrdv: http://www.speedshare.org/download.php?id=5B284B0413

@ProgAndy

According to this topic:

#727331

Can you please make modification to ImageSearch DLL so it can search for image given as hBitmap instead of its filename?

With such modification you can place image to be searched to resources and search for it directly without need of extraction.

Edited by Zedna

Share this post


Link to post
Share on other sites

how would u be able to make it keep searching the screen 4 the pic if it dosnt find it it will search again till it finds it? and away to do it the other way it searches the screen if it finds it it searches again then when it cant find it it will do what i want it to do can that be done?

Share this post


Link to post
Share on other sites

is there anyway to make it search the full internet window even if the pic isnt showing like it will scroll down and click on the image?

Share this post


Link to post
Share on other sites

this is a great include, this is making me write a macro to bee so much easier. it was working but now i come to get an error belo:

C:\Program Files (x86)\AutoIt3\Include\ImageSearch.au3 (40) : ==> Subscript used with non-Array variable.:

if $result[0]= "0" then return 0

if $result^ ERROR

it was working then all of a sudden it doesn't work no more any help would be appreciated.

Share this post


Link to post
Share on other sites

ImageSearchDLL.dll got GDI object leak. call non stop _ImageSearchArea() and see how GDI object counter increased. After some time _ImageSearchArea() start return 0. Can some one fix this?

Share this post


Link to post
Share on other sites

Hi,

you could find a useful script at http://www.autoit.de/index.php?page=Thread&postID=110480#post110480 The Scriptname is PushTheButton and should do all what you like to do.....

The Script makes a Screenshot of an Area (i.e. a Button) of your Screen, saves this Area to Disk and finds this "Picture" at the Screen or in a selected window and "clicks" it with the mouse (left,right, double....), if you search in a scrollable window, the script scrolls down in the window until it has found the Button.

The Area can be selected by a zoomable window. You can use the Mousewheel to zoom in/out and resize the "Zoomwindow" by pressing either the Ctrl-key and Arrow-keys or use the mouse, there is a Mode for preventing "hilighting" a Button (or something else) and a Moviemode which is used to find an animated Button/Logo/Smilie or something like this.....

The helpwindow/instructions and traymenu is actually in german language, but i try to make a selection to english. There is also a short demo which shows you to use the searchfunction in your own scripts.

I used the prospeed.dll to find the "Buttons" very fast (<70ms at 1920x1080), but you dont need the dll, the program works also without it, a little slower ....but who cares^^.

If you like imagesearch, take PushtheButton to make easily pics....

Andy

Share this post


Link to post
Share on other sites

It could search with tolerance, its only a small change...but i've never used it, there is no reason for me.  I never found a clickable, semitransparent button on a Website with an always changing background. The only reason that i could imagine would in pixelbots....but i dont neet that feature^^. But you could use ImageSearch for that.

Andy

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...