Jump to content



Photo

Image Search Library


  • Please log in to reply
163 replies to this topic

#41 fork4k

fork4k

    Seeker

  • New Members
  • 1 posts

Posted 27 May 2009 - 02:29 PM

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?





#42 ending

ending

    Wayfarer

  • Active Members
  • Pip
  • 74 posts

Posted 30 June 2009 - 01:18 PM

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!

#43 ending

ending

    Wayfarer

  • Active Members
  • Pip
  • 74 posts

Posted 30 June 2009 - 01:21 PM

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, 02 July 2009 - 01:30 PM.


#44 sugarcl

sugarcl

    Seeker

  • New Members
  • 1 posts

Posted 14 August 2009 - 07:28 PM

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?

#45 Zzxxcv

Zzxxcv

    Seeker

  • New Members
  • 2 posts

Posted 15 August 2009 - 12:36 PM

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 http://www.autoitscript.com/forum/index.php?showtopic=65748&view=findpost&p=551948, but scipt interrupt and ask me to and task.


tnx for help and sorry for noob question.

#46 junkew

junkew

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 322 posts

Posted 19 August 2009 - 09:16 PM

hide the mouse before you search
or
get the mouse location
move the mouse to position 1,1
do the search
move the mouse back to the original location

#47 Horrendous

Horrendous

    Seeker

  • Active Members
  • 16 posts

Posted 14 September 2009 - 08:17 PM

Looks great!! Which tool do you usually use to get bmp you want to search?

#48 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,315 posts

Posted 14 September 2009 - 09:49 PM

Looks great!! Which tool do you usually use to get bmp you want to search?


Alt+PrintScreen --> MS Paint --> Ctrl+V
or
_ScreenCapture_Capture()

#49 Horrendous

Horrendous

    Seeker

  • Active Members
  • 16 posts

Posted 15 September 2009 - 04:34 AM

Alt+PrintScreen --> MS Paint --> Ctrl+V
or
_ScreenCapture_Capture()


thx :D

#50 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,315 posts

Posted 16 September 2009 - 04:27 PM

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:
http://www.autoitscript.com/forum/index....?showtopic=102430&view=findpost&p=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, 16 September 2009 - 04:29 PM.


#51 epicfail

epicfail

    Prodigy

  • Active Members
  • PipPipPip
  • 182 posts

Posted 20 September 2009 - 02:13 PM

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?

#52 Xwolf

Xwolf

    Seeker

  • Active Members
  • 40 posts

Posted 23 September 2009 - 07:56 AM

Nice code. 3Q... :D

#53 epicfail

epicfail

    Prodigy

  • Active Members
  • PipPipPip
  • 182 posts

Posted 23 September 2009 - 12:17 PM

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?

#54 ttocszed

ttocszed

    Seeker

  • Active Members
  • 9 posts

Posted 30 September 2009 - 11:19 PM

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.

#55 border

border

    Seeker

  • Active Members
  • 5 posts

Posted 17 October 2009 - 06:18 PM

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?

#56 AndyG

AndyG

    Prodigy

  • Active Members
  • PipPipPip
  • 187 posts

Posted 17 October 2009 - 07:52 PM

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

#57 border

border

    Seeker

  • Active Members
  • 5 posts

Posted 17 October 2009 - 09:35 PM

Image_Search_Library can search with tolerance. Your script cant do this or can?

#58 AndyG

AndyG

    Prodigy

  • Active Members
  • PipPipPip
  • 187 posts

Posted 18 October 2009 - 07:45 AM

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

#59 border

border

    Seeker

  • Active Members
  • 5 posts

Posted 20 October 2009 - 11:07 PM

Image_Search_Library got memory leak. I cant use it

Edited by border, 20 October 2009 - 11:09 PM.


#60 border

border

    Seeker

  • Active Members
  • 5 posts

Posted 26 October 2009 - 10:05 PM

Andy can you add "tolerance" into function?




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users