|
You last visited: Today at 23:25
Advertisement
Help Using ImageSearchArea!!
Discussion on Help Using ImageSearchArea!! within the AutoIt forum part of the Coders Den category.
11/19/2019, 00:01
|
#1
|
elite*gold: 0
Join Date: Aug 2012
Posts: 20
Received Thanks: 5
|
Help Using ImageSearchArea!!
Hii, Can help me make this code work?
I'm trying to find one image in a certain range, but I can't get it to detect it
I use this code to capture the position
Code:
_ImageSearch('Res/Ok1.png',1,$Sx,$Sy,10)
Ok here all ok the position of the imagen Ok is save in Sx,Sy
using this another code i move the mouse in the specific range whats i want
Code:
MouseClick("left",$Sx+60,$Sy-164)
here one pict of the example
the black box is the area that is supposed to detect, since the mouse moves just to the upper right corner
now i want in this range detect the icon of the star using imageSearchArea
Code:
_ImageSearchArea('Res/Star.png',1,$Sx,$Sy,$Sx+60,$Sy-164,$x,$y,10)
here is the problem... i not found the imagen :S whats is wrong?
using this i can capture the image
Code:
_ImageSearch('Res/Star.png',1,$x,$y,10)
but I need to detect this range, since this window is open several times, and I need to detect "the star" in the specific window of the "Ok" event
|
|
|
11/19/2019, 01:59
|
#2
|
elite*gold: 0
Join Date: Apr 2011
Posts: 363
Received Thanks: 167
|
Quote:
Originally Posted by edmer
Hii, Can help me make this code work?
I'm trying to find one image in a certain range, but I can't get it to detect it
I use this code to capture the position
Code:
_ImageSearch('Res/Ok1.png',1,$Sx,$Sy,10)
Ok here all ok the position of the imagen Ok is save in Sx,Sy
using this another code i move the mouse in the specific range whats i want
Code:
MouseClick("left",$Sx+60,$Sy-164)
here one pict of the example
the black box is the area that is supposed to detect, since the mouse moves just to the upper right corner
now i want in this range detect the icon of the star using imageSearchArea
Code:
_ImageSearchArea('Res/Star.png',1,$Sx,$Sy,$Sx+60,$Sy-164,$x,$y,10)
here is the problem... i not found the imagen :S whats is wrong?
using this i can capture the image
Code:
_ImageSearch('Res/Star.png',1,$x,$y,10)
but I need to detect this range, since this window is open several times, and I need to detect "the star" in the specific window of the "Ok" event
|
Search area is a rectangle from top left to right bottom, you first search for your button position, but your search area is wrong u should use
Code:
_ImageSearchArea('Res/Star.png',1,$Sx,$Sy-164,$Sx+60,$Sy,$x,$y,10)
|
|
|
11/19/2019, 02:11
|
#3
|
elite*gold: 0
Join Date: Aug 2012
Posts: 20
Received Thanks: 5
|
Quote:
Originally Posted by elmarcia
Search area is a rectangle from top left to right bottom, you first search for your button position, but your search area is wrong u should use
Code:
_ImageSearchArea('Res/Star.png',1,$Sx,$Sy-164,$Sx+60,$Sy,$x,$y,10)
|
Is working XD i do not understand how but is working XD hahaha tyy !!
|
|
|
11/19/2019, 15:07
|
#4
|
elite*gold: 0
Join Date: Apr 2011
Posts: 363
Received Thanks: 167
|
Quote:
Originally Posted by edmer
Is working XD i do not understand how but is working XD hahaha tyy !!
|
Here is a detailed explanation of why its working, i don't know if that would help u understand, but anyway, coord system is xo,yo,x1,y1, where xo,yo are left and top coordinates and x1,y1 are right and bottom
Note that (sx+60,sy - 164) is right coordinate but not bottom
|
|
|
11/21/2019, 16:48
|
#5
|
elite*gold: 0
Join Date: Aug 2012
Posts: 20
Received Thanks: 5
|
Oh men, ty !! perfectly understood thank you very much  !! If you made this material just to explain this excellent, thank you very much for the explanation!
I have anothers doubts, since I would like to speed up my script a little more, so many images to look for ends up slowing the script a bit, I don't know if to put the image to look complete or just a piece of it, if this affects or not, or if it is better to use pixelsearch or some other function ... should I create a new thread?
|
|
|
 |
Similar Threads
|
imagesearcharea
07/30/2014 - AutoIt - 19 Replies
Hey Leute, hab leider weder im Internet noch in der Datei imagesearch.au3 was zu Parameterliste von _imagesearcharea gefunden, daher nun meine Frage:
Fall 1:
#include <ImageSearch.au3>
$aFenster = WinGetPos ("Windows Media Player")
Local $result_x, $result_y
If _ImageSearchArea(@ScriptDir & "/Data/2.bmp", 0, $aFenster, $aFenster, $aFenster+$aFenster, $aFenster+$aFenster, $result_x, $result_y, 50) == 1 Then
MsgBox("", "Erfolg", "Erfolg")
|
ImageSearchArea
08/08/2013 - AutoIt - 7 Replies
Alright im trying to search a certain area And cant seem to wrap my head around the code.
_ImageSearchArea("$vcl.bmp",$resultPosi tion,$x1,$y1,$right,$bottom,ByRef $x, ByRef $y, $tolerance)
The place im trying to search is:
- Top Left corner : 298,211
- Bottom Right corner: 507, 279
|
USING SK IN ACCECORIES AND USING ELEM OF OTHER RACES
12/11/2008 - RFO Hacks, Bots, Cheats, Exploits & Guides - 17 Replies
sorry they told me to delete it .. @.@ i didnt read the rules !!
|
I need help using S.H. lvler using loveforever ring
07/22/2008 - Conquer Online 2 - 0 Replies
I tried using the S.H. bot to lvl my S.H. to fixed...but it wont start when I set the sit key and S.H. key and press <Shift+Q> I need help. Thank you. *o.o*
|
All times are GMT +1. The time now is 23:28.
|
|