AutoHotkey Community

It is currently May 26th, 2012, 12:24 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: September 18th, 2008, 7:24 pm 
I tried to find an icon at the "World Of Warcraft" screen, but ImageSearch everytime comes up whith Errorlevel 1.
    The InGame-Screenshot was made with Hooversnap ScreenShot Tool and was saved as BMP.
    The Icon, what I´m searching for is 35x35, 96 dpi and 24bit (original size from screenshot)
    Position an size of scan area (upper left and lower right corner) are set right
    I tried *n from 0 up to maximum
    CoordMode is set to Pixel/Screen


...but ImageSearch can not find my 35x35 BMP-Picture

of course .. the name is ImageSearch.
May be, there is an undocumented function called ImageFIND :wink: or any recommendation how I can solve this problem.

hopefully,
Guest2 (aka Frank)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 18th, 2008, 7:46 pm 
Offline

Joined: July 21st, 2008, 4:16 pm
Posts: 726
Location: Calgary, AB, Canada
Maybe post your code... What is your variation at?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 18th, 2008, 8:23 pm 
Offline

Joined: April 17th, 2007, 1:37 pm
Posts: 761
Location: Florida
Post the image you're searching for, I have a feeling I know what's wrong.

_________________
[Join IRC!]
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 18th, 2008, 10:27 pm 
Sivvy wrote:
Maybe post your code... What is your variation at?

Sivvy, there is no special code, because I tested it with

Code:
ImageSearch, NotUsedX, NotUsedY, X1, Y1, X2, Y2, *n filename.bmp


At the beginning X1, Y1, X2, Y2 was the exact position, where the Image should be at the InGame screen. Since it did not work, I decreased the upper left and increased the lower right values.

*n was almost every value from 0 to 255 (step 10).
At small values ImageSearch found noting and from one point on it found "everything" (because every color was matching).

With ErrorLevel 0,1 & 2 I checked, if my 35x35 Image exists at the right directory and if it was located at the InGame screen.

well .. it´s at the right place at harddisk and readable, but it´s never been found at the screen


Rhys wrote:
Post the image you're searching for, I have a feeling I know what's wrong.


Here are my 2 BMP and TIF Images.


[sorry for that bad english, but I learned only some english at school about 30 years ago]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 19th, 2008, 5:38 pm 
I played arround with BMP and TIF for hours and it´s still the same.

PixelGetColor works at the same scan area InGame, but it does not fit the needs. The InGame-Icon can have several states - so I have to check one special state by comparing the whole icon.


Report this post
Top
  
Reply with quote  
 Post subject: SOLVED
PostPosted: September 19th, 2008, 11:21 pm 
Quote:
ImageSearch can be used to detect graphical objects on the screen


At least with World Of Warcraft this statement is definitely wrong.

With World Of Warcraft ImageSearch can be used to detect graphical objects on the screen if WoW is the active window.

window <> screen

ImageSearch does not find viewable graphical objects, if my tiny GUI Script-Menue is the active window.

And CoordMode, Pixel, Screen has no effect in that case.


Report this post
Top
  
Reply with quote  
 Post subject: Ahk does work in WoW
PostPosted: September 20th, 2008, 2:50 am 
Offline

Joined: December 20th, 2005, 4:15 am
Posts: 165
Location: Malaysia
I used to play WoW till around July this year. I had a simple script, and can confirm that ImageSearch does work here.

sample code:

Code:
ImageSearch, GoldX,GoldY , X1,Y1, X2,Y2, *3 gold.bmp


You may need to recapture your images and play around with the variation (*n) in the code. *3 worked for me, though you may need something higher on your system.

Also, try to minimize the size of the bmps or ImageSearch will have trouble matching them. My bmps are only about 25x20, with some as small as 17x14. Of course, don't make them too small or ImageSearch will just match too many things.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Ahk does work in WoW
PostPosted: September 20th, 2008, 12:36 pm 
Lemming wrote:
I used to play WoW till around July this year. I had a simple script, and can confirm that ImageSearch does work here.


thanks for confirmation. I think this issue is no longer releated to AHK.

If WoW is the active window, and if I´m not in fight, it works fine without any variation. But while fighting it does not.

It was a lack of knowledge an unterstanding of how AHK exactly behaves in such cases.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Morpheus, RUBn, SKAN, sks, Yahoo [Bot] and 20 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group