I'm stuck again...When I put loop how to make it stop and just let the other actions do their job when something happens like when it finds an image?
Thanks.
Loops
Re: Loops
You could the "Variable condition" action that allows you to jump to a line of your script depending on the value of a variable.
"My software never has bugs. It just develops random features."
Re: Loops
I don't understand your question. The value of the "position" field in the Find Image action is the name of the variable where to store the position. This is filled in when the action gets executed.
Could you post the content of your script here? (Goto File->Export and paste the text here)
Could you post the content of your script here? (Goto File->Export and paste the text here)
"My software never has bugs. It just develops random features."
Re: Loops
Hmm...I need it to go forever until something happens. Like until it sees a specific text message in a chat or somewhere else. Ok now I figured that I don't really need 'loop' when I have 'Variable condition'. But what value to put in 'Variable condition' for it if variable value are coordinates from 'Find image'. And what 'Comparison' should I set. And this is the code:
And I attached an Actionaz file too.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
<settings program="actionaz" version="3.2.1" scriptVersion="1.0.0" os="Windows"/>
<actions>
<action name="ActionClick" version="1.0.0"/>
<action name="ActionFindImage" version="1.0.0"/>
<action name="ActionVariableCondition" version="1.0.0"/>
</actions>
<parameters/>
<script pauseBefore="0" pauseAfter="3000">
<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">2</subParameter>
</parameter>
<parameter name="imageToFind">
<subParameter name="value" code="0">C:/Documents and Settings/NT/My Documents/My Pictures/explorer.bmp</subParameter>
</parameter>
<parameter name="position">
<subParameter name="value" code="0">img</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="ActionVariableCondition">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="ifEqual">
<subParameter name="line" code="0">003</subParameter>
<subParameter name="action" code="0">goto</subParameter>
</parameter>
<parameter name="comparison">
<subParameter name="value" code="0">equal</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">img</subParameter>
</parameter>
<parameter name="value">
<subParameter name="value" code="0">what to put here?</subParameter>
</parameter>
<parameter name="ifDifferent">
<subParameter name="line" code="0">001</subParameter>
<subParameter name="action" code="0">goto</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">img</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="0">1141:9</subParameter>
</parameter>
</action>
</script>
</scriptfile>
- Attachments
-
- example.rar
- Actionaz script file
- (734 Bytes) Downloaded 222 times
Re: Loops
Sorry for the late reply. I didn't have much free time these days.
The "Find Image" action throws and exception and stops the script execution when it cannot find the image, to change that go to the Exceptions tab and choose "Go to a line" in "Cannot find the image". This will allow you to find out if the image has been found or not. When it is found then the next action is executed. So if you specify the line of the Find Image action then it will search until it finds the image.
The "Find Image" action throws and exception and stops the script execution when it cannot find the image, to change that go to the Exceptions tab and choose "Go to a line" in "Cannot find the image". This will allow you to find out if the image has been found or not. When it is found then the next action is executed. So if you specify the line of the Find Image action then it will search until it finds the image.
"My software never has bugs. It just develops random features."