I'm sorry, I need help again.
There is an area on the screen, a rectangle, and its coordinates are:
Top left: 744:522
Top right: 939:522
Bottom left: 744:542
Bottom right: 939:542
I would like it to search for color yellow inside that area, and when it founds it, that it clicks it, yellow is a small triangle that appears randomly on screen.
I don't know where to start since I only know how to use getpixel and click options inside but I don't know how to combine them to do that... so some help would be grateful.
Thank you.
Scan color from coordinate from coordinate
Re: Scan color from coordinate from coordinate
Hi,
You have two options :
You have two options :
- Use the Find Image action to find your triangle, store the result in a variable and emulate a click at this position
- You could also take a screenshot of the screen at these coordinates and search within this screenshot for the pixel you want, this will require some Javascript skills, but it not very complicated (to take a screenshot: http://wiki.actionaz.org/doku.php?id=en ... screenshot)
"My software never has bugs. It just develops random features."
Re: Scan color from coordinate from coordinate
I would really like an example, when you have some time, please.
Problem is that, triangle changes position after some time so ...
It looks similar to this
and I don't know if it is an image, it changes its position.
It is on website, but I can't right click it.
I tried to use FindPicture but I don't know what to select window (since I open the website in opera) or picture...
Ty and sorry for the trouble.
Problem is that, triangle changes position after some time so ...
It looks similar to this
and I don't know if it is an image, it changes its position.
It is on website, but I can't right click it.
I tried to use FindPicture but I don't know what to select window (since I open the website in opera) or picture...
Ty and sorry for the trouble.
Re: Scan color from coordinate from coordinate
What website is it? and how do i make that picture show on the website? I maybe can get it in some way and then post it here.
Re: Scan color from coordinate from coordinate
You don't need to specify any window if you use a screenshot. It won't work anyway if the window is hidden.
Here is an example :
Note that I had to set the "Down pyramid count" to 1 instead of 2 because the target is small, but this depends on your target image and the image/window you are searching into.
Here is the target image I used :
Here is an example :
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
<settings program="actionaz" version="3.4.2" scriptVersion="1.0.0" os="GNU/Linux"/>
<actions>
<action name="ActionClick" version="1.0.0"/>
<action name="ActionFindImage" version="1.0.0"/>
</actions>
<parameters/>
<script pauseBefore="0" pauseAfter="0">
<action name="ActionFindImage">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="32" action="0" line=""/>
<exception id="33" action="0" line=""/>
<parameter name="searchExpansion">
<subParameter name="value" code="0">15</subParameter>
</parameter>
<parameter name="windowName">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="confidenceMinimum">
<subParameter name="value" code="0">70</subParameter>
</parameter>
<parameter name="downPyramidCount">
<subParameter name="value" code="0">1</subParameter>
</parameter>
<parameter name="imageToFind">
<subParameter name="value" code="0">target.png</subParameter>
</parameter>
<parameter name="position">
<subParameter name="value" code="0">pos</subParameter>
</parameter>
<parameter name="imageToSearchIn">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="source">
<subParameter name="value" code="0">screenshot</subParameter>
</parameter>
<parameter name="maximumMatches">
<subParameter name="value" code="0">1</subParameter>
</parameter>
<parameter name="windowRelativePosition">
<subParameter name="value" code="0">false</subParameter>
</parameter>
</action>
<action name="ActionClick">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="32" action="0" line=""/>
<exception id="33" action="0" line=""/>
<parameter name="button">
<subParameter name="value" code="0">left</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="amount">
<subParameter name="value" code="0">1</subParameter>
</parameter>
<parameter name="position">
<subParameter name="value" code="1">pos</subParameter>
</parameter>
</action>
</script>
</scriptfile>
Here is the target image I used :
"My software never has bugs. It just develops random features."
Re: Scan color from coordinate from coordinate
Thank you, that helped a lot.