Post here if you need help using Actiona
andrewmark
Posts: 6 Joined: 07 Apr 2012, 11:19
Post
by andrewmark » 09 Apr 2012, 17:30
Hello,
How can i use what i write in data input with two loops? It seems it doesn't work two loops with the same variable (in my case "x"). I've search on google and try something but without results. Can you help me, please?
Also i need to write to console after every repeat that it finished a repeat (for example: finished round 1; then: finished round 2 etc)... the "finished round" is static text but the numbers need to change every time, so how can i do this?
Thanks a lot for your help!
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
<settings program="actionaz" version="3.2.2" scriptVersion="1.0.0" os="GNU/Linux"/>
<actions>
<action name="ActionClick" version="1.0.0"/>
<action name="ActionWindowCondition" version="1.0.0"/>
<action name="ActionCode" version="1.0.0"/>
<action name="ActionConsole" version="1.0.0"/>
<action name="ActionDataInput" version="1.0.0"/>
<action name="ActionWriteText" version="1.0.0"/>
<action name="ActionKey" version="1.0.0"/>
<action name="ActionVariable" version="1.0.0"/>
<action name="ActionLoop" version="1.0.0"/>
</actions>
<parameters/>
<script pauseBefore="500" pauseAfter="0">
<action name="ActionVariable" comment="set the initial value of the position variable">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="32" action="0" line=""/>
<parameter name="colorValue">
<subParameter name="value" code="0">::</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">position</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">position</subParameter>
</parameter>
<parameter name="value">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="positionValue">
<subParameter name="value" code="0">1234:40</subParameter>
</parameter>
</action>
<action name="ActionDataInput" comment="i need data from here to use with 2 loops" color="#c7211b">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="windowIcon">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="defaultValue">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="dataType">
<subParameter name="value" code="0">integer</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">x</subParameter>
</parameter>
<parameter name="question">
<subParameter name="value" code="0">how many paste do you want?</subParameter>
</parameter>
</action>
<action name="ActionKey" comment="open the application i work with">
<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="alt">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="meta">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="key">
<subParameter name="key" code="0">1</subParameter>
<subParameter name="isQtKey" code="0">true</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">Win32</subParameter>
</parameter>
<parameter name="shift">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="ctrl">
<subParameter name="value" code="0">true</subParameter>
</parameter>
<parameter name="pause">
<subParameter name="value" code="0">10</subParameter>
</parameter>
</action>
<action name="ActionWindowCondition" comment="wait to open... then continue">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="width">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="title">
<subParameter name="value" code="0">App Example</subParameter>
</parameter>
<parameter name="processId">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="condition">
<subParameter name="value" code="0">exists</subParameter>
</parameter>
<parameter name="height">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="ifTrue">
<subParameter name="line" code="0">C4</subParameter>
<subParameter name="action" code="0">goto</subParameter>
</parameter>
<parameter name="ifFalse">
<subParameter name="line" code="0"></subParameter>
<subParameter name="action" code="0">wait</subParameter>
</parameter>
<parameter name="yCoordinate">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="xCoordinate">
<subParameter name="value" code="0"></subParameter>
</parameter>
</action>
<action name="ActionKey" label="C4" comment="tab">
<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="alt">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="meta">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="key">
<subParameter name="key" code="0">Tab</subParameter>
<subParameter name="isQtKey" code="0">true</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">Win32</subParameter>
</parameter>
<parameter name="shift">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="ctrl">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="pause">
<subParameter name="value" code="0">10</subParameter>
</parameter>
</action>
<action name="ActionKey" comment="enter" pauseAfter="500">
<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="alt">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="meta">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="key">
<subParameter name="key" code="0">Return</subParameter>
<subParameter name="isQtKey" code="0">true</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">Win32</subParameter>
</parameter>
<parameter name="shift">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="ctrl">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="pause">
<subParameter name="value" code="0">10</subParameter>
</parameter>
</action>
<action name="ActionClick" comment="click clipboard manager" pauseAfter="500">
<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">1234:13</subParameter>
</parameter>
</action>
<action name="ActionClick" comment="select from clipboard position x y" pauseAfter="500">
<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="amount">
<subParameter name="value" code="0">1</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="position">
<subParameter name="value" code="1">position</subParameter>
</parameter>
</action>
<action name="ActionCode" comment="increase the y value (vertical) of the position variable">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="code">
<subParameter name="value" code="1">position.y += 20</subParameter>
</parameter>
</action>
<action name="ActionKey" comment="enter" pauseAfter="10000">
<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="alt">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="meta">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="key">
<subParameter name="key" code="0">Return</subParameter>
<subParameter name="isQtKey" code="0">true</subParameter>
</parameter>
<parameter name="ctrl">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="shift">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">Win32</subParameter>
</parameter>
<parameter name="pause">
<subParameter name="value" code="0">10</subParameter>
</parameter>
</action>
<action name="ActionLoop" comment="repeat x times (from line 003)">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="line">
<subParameter name="value" code="0">003</subParameter>
</parameter>
<parameter name="count">
<subParameter name="value" code="1">x = x - 1</subParameter>
</parameter>
</action>
<action name="ActionKey" comment="open another application">
<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="alt">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="meta">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="key">
<subParameter name="key" code="0">1</subParameter>
<subParameter name="isQtKey" code="0">true</subParameter>
</parameter>
<parameter name="ctrl">
<subParameter name="value" code="0">true</subParameter>
</parameter>
<parameter name="shift">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">Win32</subParameter>
</parameter>
<parameter name="pause">
<subParameter name="value" code="0">10</subParameter>
</parameter>
</action>
<action name="ActionWindowCondition" comment="wait to open... then continue">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="width">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="title">
<subParameter name="value" code="0">App Example</subParameter>
</parameter>
<parameter name="condition">
<subParameter name="value" code="0">exists</subParameter>
</parameter>
<parameter name="processId">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="height">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="ifTrue">
<subParameter name="line" code="0">C4</subParameter>
<subParameter name="action" code="0">goto</subParameter>
</parameter>
<parameter name="ifFalse">
<subParameter name="line" code="0"></subParameter>
<subParameter name="action" code="0">wait</subParameter>
</parameter>
<parameter name="yCoordinate">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="xCoordinate">
<subParameter name="value" code="0"></subParameter>
</parameter>
</action>
<action name="ActionWriteText" comment="text">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="32" action="0" line=""/>
<parameter name="text">
<subParameter name="value" code="0">test</subParameter>
</parameter>
</action>
<action name="ActionKey" comment="enter" pauseAfter="500">
<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="alt">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="meta">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="key">
<subParameter name="key" code="0">Return</subParameter>
<subParameter name="isQtKey" code="0">true</subParameter>
</parameter>
<parameter name="ctrl">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="shift">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">Win32</subParameter>
</parameter>
<parameter name="pause">
<subParameter name="value" code="0">10</subParameter>
</parameter>
</action>
<action name="ActionConsole" comment="i need here to write every x time that finished a round (e.q. round #1 / round #2 etc)" color="#c7211b">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="output">
<subParameter name="value" code="0">information</subParameter>
</parameter>
<parameter name="text">
<subParameter name="value" code="0">terminat cont: 1</subParameter>
</parameter>
</action>
<action name="ActionLoop" comment="repeat x times (from line 012)">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="line">
<subParameter name="value" code="0">012</subParameter>
</parameter>
<parameter name="count">
<subParameter name="value" code="1">x = x - 1</subParameter>
</parameter>
</action>
</script>
</scriptfile>
Jmgr
Admin
Posts: 1651 Joined: 07 Dec 2005, 15:45
Contact:
Post
by Jmgr » 09 Apr 2012, 22:07
Hi,
I think your problem is that you do not need to decrement x (subtract 1) in each loop. You just have to write x.
The loop itself will internally compute how many times it has "jumped" to the first line.
When an external loop jumps over an internal loop, the counter of the internal loop is reset to its original value.
To insert the value of a variable into a text you can write a $ sign before the name of the variable. (see line 16)
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
<settings program="actionaz" version="3.4.0" scriptVersion="1.0.0" os="GNU/Linux"/>
<actions>
<action name="ActionKey" version="1.0.0"/>
<action name="ActionLoop" version="1.0.0"/>
<action name="ActionVariable" version="1.0.0"/>
<action name="ActionClick" version="1.0.0"/>
<action name="ActionCode" version="1.0.0"/>
<action name="ActionWindowCondition" version="1.0.0"/>
<action name="ActionWriteText" version="1.0.0"/>
<action name="ActionConsole" version="1.0.0"/>
<action name="ActionDataInput" version="1.0.0"/>
</actions>
<parameters/>
<script pauseBefore="500" pauseAfter="0">
<action name="ActionVariable" comment="set the initial value of the position variable">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="32" action="0" line=""/>
<parameter name="colorValue">
<subParameter name="value" code="0">::</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">position</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">position</subParameter>
</parameter>
<parameter name="value">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="positionValue">
<subParameter name="value" code="0">1234:40</subParameter>
</parameter>
</action>
<action name="ActionDataInput" comment="i need data from here to use with 2 loops" color="#c7211b">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="windowIcon">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="defaultValue">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="dataType">
<subParameter name="value" code="0">integer</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">x</subParameter>
</parameter>
<parameter name="question">
<subParameter name="value" code="0">how many paste do you want?</subParameter>
</parameter>
</action>
<action name="ActionKey" comment="open the application i work with">
<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="alt">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="meta">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="key">
<subParameter name="key" code="0">1</subParameter>
<subParameter name="isQtKey" code="0">true</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">Win32</subParameter>
</parameter>
<parameter name="shift">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="ctrl">
<subParameter name="value" code="0">true</subParameter>
</parameter>
<parameter name="pause">
<subParameter name="value" code="0">10</subParameter>
</parameter>
</action>
<action name="ActionWindowCondition" comment="wait to open... then continue">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="width">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="title">
<subParameter name="value" code="0">App Example</subParameter>
</parameter>
<parameter name="processId">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="condition">
<subParameter name="value" code="0">exists</subParameter>
</parameter>
<parameter name="height">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="ifTrue">
<subParameter name="line" code="0">C4</subParameter>
<subParameter name="action" code="0">goto</subParameter>
</parameter>
<parameter name="ifFalse">
<subParameter name="line" code="0"></subParameter>
<subParameter name="action" code="0">wait</subParameter>
</parameter>
<parameter name="yCoordinate">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="xCoordinate">
<subParameter name="value" code="0"></subParameter>
</parameter>
</action>
<action name="ActionKey" label="C4" comment="tab">
<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="alt">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="meta">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="key">
<subParameter name="key" code="0">Tab</subParameter>
<subParameter name="isQtKey" code="0">true</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">Win32</subParameter>
</parameter>
<parameter name="shift">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="ctrl">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="pause">
<subParameter name="value" code="0">10</subParameter>
</parameter>
</action>
<action name="ActionKey" comment="enter" pauseAfter="500">
<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="alt">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="meta">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="key">
<subParameter name="key" code="0">Return</subParameter>
<subParameter name="isQtKey" code="0">true</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">Win32</subParameter>
</parameter>
<parameter name="shift">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="ctrl">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="pause">
<subParameter name="value" code="0">10</subParameter>
</parameter>
</action>
<action name="ActionClick" comment="click clipboard manager" pauseAfter="500">
<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">1234:13</subParameter>
</parameter>
</action>
<action name="ActionClick" comment="select from clipboard position x y" pauseAfter="500">
<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="amount">
<subParameter name="value" code="0">1</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="position">
<subParameter name="value" code="1">position</subParameter>
</parameter>
</action>
<action name="ActionCode" comment="increase the y value (vertical) of the position variable">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="code">
<subParameter name="value" code="1">position.y += 20</subParameter>
</parameter>
</action>
<action name="ActionKey" comment="enter" pauseAfter="10000">
<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="alt">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="meta">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="key">
<subParameter name="key" code="0">Return</subParameter>
<subParameter name="isQtKey" code="0">true</subParameter>
</parameter>
<parameter name="ctrl">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="shift">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">Win32</subParameter>
</parameter>
<parameter name="pause">
<subParameter name="value" code="0">10</subParameter>
</parameter>
</action>
<action name="ActionLoop" comment="repeat x times (from line 003)">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="line">
<subParameter name="value" code="0">003</subParameter>
</parameter>
<parameter name="count">
<subParameter name="value" code="1">x</subParameter>
</parameter>
</action>
<action name="ActionKey" comment="open another application">
<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="alt">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="meta">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="key">
<subParameter name="key" code="0">1</subParameter>
<subParameter name="isQtKey" code="0">true</subParameter>
</parameter>
<parameter name="ctrl">
<subParameter name="value" code="0">true</subParameter>
</parameter>
<parameter name="shift">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">Win32</subParameter>
</parameter>
<parameter name="pause">
<subParameter name="value" code="0">10</subParameter>
</parameter>
</action>
<action name="ActionWindowCondition" comment="wait to open... then continue">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="width">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="title">
<subParameter name="value" code="0">App Example</subParameter>
</parameter>
<parameter name="condition">
<subParameter name="value" code="0">exists</subParameter>
</parameter>
<parameter name="processId">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="height">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="ifTrue">
<subParameter name="line" code="0">C4</subParameter>
<subParameter name="action" code="0">goto</subParameter>
</parameter>
<parameter name="ifFalse">
<subParameter name="line" code="0"></subParameter>
<subParameter name="action" code="0">wait</subParameter>
</parameter>
<parameter name="yCoordinate">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="xCoordinate">
<subParameter name="value" code="0"></subParameter>
</parameter>
</action>
<action name="ActionWriteText" comment="text">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="32" action="0" line=""/>
<parameter name="text">
<subParameter name="value" code="0">test</subParameter>
</parameter>
</action>
<action name="ActionKey" comment="enter" pauseAfter="500">
<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="alt">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="action">
<subParameter name="value" code="0">pressRelease</subParameter>
</parameter>
<parameter name="meta">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="key">
<subParameter name="key" code="0">Return</subParameter>
<subParameter name="isQtKey" code="0">true</subParameter>
</parameter>
<parameter name="ctrl">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="shift">
<subParameter name="value" code="0">false</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">Win32</subParameter>
</parameter>
<parameter name="pause">
<subParameter name="value" code="0">10</subParameter>
</parameter>
</action>
<action name="ActionConsole" comment="i need here to write every x time that finished a round (e.q. round #1 / round #2 etc)" color="#c7211b">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="output">
<subParameter name="value" code="0">information</subParameter>
</parameter>
<parameter name="text">
<subParameter name="value" code="0">terminat cont: $x</subParameter>
</parameter>
</action>
<action name="ActionLoop" comment="repeat x times (from line 012)">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="line">
<subParameter name="value" code="0">012</subParameter>
</parameter>
<parameter name="count">
<subParameter name="value" code="1">x</subParameter>
</parameter>
</action>
</script>
</scriptfile>
"My software never has bugs. It just develops random features."
andrewmark
Posts: 6 Joined: 07 Apr 2012, 11:19
Post
by andrewmark » 09 Apr 2012, 23:08
For my first issue i will come back later, i need to test it again.
As for writing to console, it's not enough $x because it write over and over again the same number i put in data input, let's take a look:
There i need to tell me that it finished first repeat, second repeat etc. (in my case: "terminat cont 1" / "terminat cont 2" etc.)
I think is not necessary to tell to write in console the variable from data input, just to count the repeats as numbers.
What do you say?
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
<settings program="actionaz" version="3.4.0" scriptVersion="1.0.0" os="Windows"/>
<actions>
<action name="ActionVariable" version="1.0.0"/>
<action name="ActionClick" version="1.0.0"/>
<action name="ActionCode" version="1.0.0"/>
<action name="ActionConsole" version="1.0.0"/>
<action name="ActionDataInput" version="1.0.0"/>
<action name="ActionLoop" version="1.0.0"/>
</actions>
<parameters/>
<script pauseBefore="0" pauseAfter="0">
<action name="ActionVariable" comment="set the initial value of the position variable">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="32" action="0" line=""/>
<parameter name="colorValue">
<subParameter name="value" code="0">::</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">position</subParameter>
</parameter>
<parameter name="positionValue">
<subParameter name="value" code="0">39:32</subParameter>
</parameter>
<parameter name="value">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">position</subParameter>
</parameter>
</action>
<action name="ActionDataInput" comment="i need data from here to use with 2 loops" color="#c7211b">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="windowIcon">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="defaultValue">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="dataType">
<subParameter name="value" code="0">integer</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">x</subParameter>
</parameter>
<parameter name="question">
<subParameter name="value" code="0">how many paste do you want?</subParameter>
</parameter>
<parameter name="windowTitle">
<subParameter name="value" code="0"></subParameter>
</parameter>
</action>
<action name="ActionClick" comment="select from clipboard position x y" pauseAfter="500">
<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">position</subParameter>
</parameter>
</action>
<action name="ActionCode" comment="increase the y value (vertical) of the position variable">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="code">
<subParameter name="value" code="1">position.y += 80</subParameter>
</parameter>
</action>
<action name="ActionConsole" comment="i need here to write every x time that finished a round (e.q. round #1 / round #2 etc)" color="#c7211b">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="output">
<subParameter name="value" code="0">information</subParameter>
</parameter>
<parameter name="text">
<subParameter name="value" code="0">terminat cont: $x</subParameter>
</parameter>
</action>
<action name="ActionLoop" comment="repeat x times (from line 003)">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="line">
<subParameter name="value" code="0">003</subParameter>
</parameter>
<parameter name="count">
<subParameter name="value" code="1">x</subParameter>
</parameter>
</action>
</script>
</scriptfile>
Jmgr
Admin
Posts: 1651 Joined: 07 Dec 2005, 15:45
Contact:
Post
by Jmgr » 10 Apr 2012, 07:09
Ah, yes, right. Well, a solution could be to copy the value of x into another variable and decrement that value instead. I will write an example when I get the time.
"My software never has bugs. It just develops random features."
andrewmark
Posts: 6 Joined: 07 Apr 2012, 11:19
Post
by andrewmark » 10 Apr 2012, 15:18
Great, i will wait for your example. Thanks!
Jmgr
Admin
Posts: 1651 Joined: 07 Dec 2005, 15:45
Contact:
Post
by Jmgr » 10 Apr 2012, 23:03
Here you have it:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
<settings program="actionaz" version="3.4.0" scriptVersion="1.0.0" os="Windows"/>
<actions>
<action name="ActionDataInput" version="1.0.0"/>
<action name="ActionLoop" version="1.0.0"/>
<action name="ActionVariable" version="1.0.0"/>
<action name="ActionClick" version="1.0.0"/>
<action name="ActionCode" version="1.0.0"/>
<action name="ActionConsole" version="1.0.0"/>
</actions>
<parameters/>
<script pauseBefore="0" pauseAfter="0">
<action name="ActionVariable" comment="set the initial value of the position variable">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="32" action="0" line=""/>
<parameter name="colorValue">
<subParameter name="value" code="0">::</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">position</subParameter>
</parameter>
<parameter name="positionValue">
<subParameter name="value" code="0">39:32</subParameter>
</parameter>
<parameter name="value">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">position</subParameter>
</parameter>
</action>
<action name="ActionDataInput" comment="i need data from here to use with 2 loops" color="#c7211b">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="windowIcon">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="defaultValue">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="dataType">
<subParameter name="value" code="0">integer</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">x</subParameter>
</parameter>
<parameter name="question">
<subParameter name="value" code="0">how many paste do you want?</subParameter>
</parameter>
<parameter name="windowTitle">
<subParameter name="value" code="0"></subParameter>
</parameter>
</action>
<action name="ActionVariable" comment="create a copy of x">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="32" action="0" line=""/>
<parameter name="colorValue">
<subParameter name="value" code="0">::</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">x2</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">integer</subParameter>
</parameter>
<parameter name="value">
<subParameter name="value" code="0">$x</subParameter>
</parameter>
<parameter name="positionValue">
<subParameter name="value" code="0">39:32</subParameter>
</parameter>
</action>
<action name="ActionClick" comment="select from clipboard position x y" pauseAfter="500">
<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">position</subParameter>
</parameter>
</action>
<action name="ActionCode" comment="increase the y value (vertical) of the position variable">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="code">
<subParameter name="value" code="1">position.y += 80</subParameter>
</parameter>
</action>
<action name="ActionConsole" comment="i need here to write every x time that finished a round (e.q. round #1 / round #2 etc)" color="#c7211b">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="output">
<subParameter name="value" code="0">information</subParameter>
</parameter>
<parameter name="text">
<subParameter name="value" code="0">terminat cont: $x2</subParameter>
</parameter>
</action>
<action name="ActionVariable" comment="decrement the value of x2">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="32" action="0" line=""/>
<parameter name="colorValue">
<subParameter name="value" code="0">::</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">x2</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">integer</subParameter>
</parameter>
<parameter name="value">
<subParameter name="value" code="1">x2 - 1</subParameter>
</parameter>
<parameter name="positionValue">
<subParameter name="value" code="0">:</subParameter>
</parameter>
</action>
<action name="ActionLoop" comment="repeat x times (from line 003)">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="line">
<subParameter name="value" code="0">004</subParameter>
</parameter>
<parameter name="count">
<subParameter name="value" code="1">x</subParameter>
</parameter>
</action>
</script>
</scriptfile>
"My software never has bugs. It just develops random features."
andrewmark
Posts: 6 Joined: 07 Apr 2012, 11:19
Post
by andrewmark » 12 Apr 2012, 14:35
Hmm, interesting... but i want to count in a reverse way compared with your example. Look at the next image, red examples. I don't know how to do it, but i need when i type in data input for example "5" when it finish first repeat to write to console "1", the next repeat to write "2" etc up to "5", in that way i will know at any moment at wich repeat is and when it finished.
If you can help me i'll be very grateful. Thanks!
Jmgr
Admin
Posts: 1651 Joined: 07 Dec 2005, 15:45
Contact:
Post
by Jmgr » 12 Apr 2012, 15:03
Here it is. If you don't understand something don't hesitate to ask.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
<settings program="actionaz" version="3.4.1" scriptVersion="1.0.0" os="Windows"/>
<actions>
<action name="ActionDataInput" version="1.0.0"/>
<action name="ActionLoop" version="1.0.0"/>
<action name="ActionVariable" version="1.0.0"/>
<action name="ActionClick" version="1.0.0"/>
<action name="ActionCode" version="1.0.0"/>
<action name="ActionConsole" version="1.0.0"/>
</actions>
<parameters/>
<script pauseBefore="0" pauseAfter="0">
<action name="ActionVariable" comment="set the initial value of the position variable">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="32" action="0" line=""/>
<parameter name="colorValue">
<subParameter name="value" code="0">::</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">position</subParameter>
</parameter>
<parameter name="positionValue">
<subParameter name="value" code="0">39:32</subParameter>
</parameter>
<parameter name="value">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">position</subParameter>
</parameter>
</action>
<action name="ActionDataInput" comment="i need data from here to use with 2 loops" color="#c7211b">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="windowIcon">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="defaultValue">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="dataType">
<subParameter name="value" code="0">integer</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">x</subParameter>
</parameter>
<parameter name="question">
<subParameter name="value" code="0">how many paste do you want?</subParameter>
</parameter>
<parameter name="windowTitle">
<subParameter name="value" code="0"></subParameter>
</parameter>
</action>
<action name="ActionVariable" comment="set x2 to 1">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="32" action="0" line=""/>
<parameter name="colorValue">
<subParameter name="value" code="0">::</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">x2</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">integer</subParameter>
</parameter>
<parameter name="value">
<subParameter name="value" code="0">1</subParameter>
</parameter>
<parameter name="positionValue">
<subParameter name="value" code="0">39:32</subParameter>
</parameter>
</action>
<action name="ActionClick" comment="select from clipboard position x y" pauseAfter="500">
<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">position</subParameter>
</parameter>
</action>
<action name="ActionCode" comment="increase the y value (vertical) of the position variable">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="code">
<subParameter name="value" code="1">position.y += 80</subParameter>
</parameter>
</action>
<action name="ActionConsole" comment="i need here to write every x time that finished a round (e.q. round #1 / round #2 etc)" color="#c7211b">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="output">
<subParameter name="value" code="0">information</subParameter>
</parameter>
<parameter name="text">
<subParameter name="value" code="0">terminat cont: $x2</subParameter>
</parameter>
</action>
<action name="ActionVariable" comment="increment the value of x2">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="32" action="0" line=""/>
<parameter name="colorValue">
<subParameter name="value" code="0">::</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">x2</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">integer</subParameter>
</parameter>
<parameter name="value">
<subParameter name="value" code="1">x2 + 1</subParameter>
</parameter>
<parameter name="positionValue">
<subParameter name="value" code="0">:</subParameter>
</parameter>
</action>
<action name="ActionLoop" comment="repeat x times (from line 003)">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="line">
<subParameter name="value" code="0">004</subParameter>
</parameter>
<parameter name="count">
<subParameter name="value" code="1">x - 1</subParameter>
</parameter>
</action>
</script>
</scriptfile>
"My software never has bugs. It just develops random features."