BOUCLE + PAUSE Intervalle
Posted: 02 Jun 2015, 18:45
Je voulais savoir comment faire un programme en boucle et a la fin juste avant la boucle le programme fait une pause d'intervalle entre 1 et 3 secondes.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
<settings program="actionaz" version="3.8.0" scriptVersion="1.1.0" os="Windows"/>
<actions>
<action name="ActionLoop" version="1.0.0"/>
<action name="ActionMessageBox" version="1.0.0"/>
<action name="ActionCode" version="1.0.0"/>
<action name="ActionPause" version="1.0.0"/>
</actions>
<parameters/>
<resources/>
<script pauseBefore="0" pauseAfter="0">
<action name="ActionCode" label="Variables">
<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">var Pause = Algorithms.randomInteger(1, 3);</subParameter>
</parameter>
</action>
<action name="ActionMessageBox" label="Message">
<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="message">
<subParameter name="value" code="0">Coucou, la pause sera de $Pause seconde(s)</subParameter>
</parameter>
<parameter name="title">
<subParameter name="value" code="0">Message</subParameter>
</parameter>
<parameter name="textMode">
<subParameter name="value" code="0">automatic</subParameter>
</parameter>
<parameter name="ifYes">
<subParameter name="line" code="0"></subParameter>
<subParameter name="action" code="0">do_nothing</subParameter>
</parameter>
<parameter name="customIcon">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="icon">
<subParameter name="value" code="0">information</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">ok</subParameter>
</parameter>
<parameter name="ifNo">
<subParameter name="line" code="0"></subParameter>
<subParameter name="action" code="0">do_nothing</subParameter>
</parameter>
</action>
<action name="ActionPause" label="Pause">
<exception id="0" action="0" line=""/>
<exception id="1" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="duration">
<subParameter name="value" code="1">Pause</subParameter>
</parameter>
<parameter name="unit">
<subParameter name="value" code="0">seconds</subParameter>
</parameter>
</action>
<action name="ActionLoop" label="Boucle">
<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">Variables</subParameter>
</parameter>
<parameter name="count">
<subParameter name="value" code="0">2</subParameter>
</parameter>
</action>
</script>
</scriptfile>