Page 1 of 1
Random number
Posted: 13 Jun 2015, 06:26
by zizi
hi jmgr
how can create a random number in actionaz and set into a variable?
actually i don't now how can create a random number in actionaz.
Re: Random number
Posted: 16 Jun 2015, 03:41
by zizi
hi again jmgr
dosen't any idea?
Re: Random number
Posted: 16 Jun 2015, 10:50
by Jmgr
Hi,
Sorry I am quite busy right now, I am writing my thesis manuscript, which is something that takes some time :p
See
this page for random number generation.
An example of script to generate a random number and insert in into a variable:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
<settings program="actiona" version="3.8.0" scriptVersion="1.1.0" os="Windows"/>
<actions>
<action name="ActionVariable" version="1.0.0"/>
<action name="ActionMessageBox" version="1.0.0"/>
</actions>
<parameters/>
<resources/>
<script pauseBefore="0" pauseAfter="0">
<action name="ActionVariable">
<exception id="1" action="0" line=""/>
<exception id="0" action="0" line=""/>
<exception id="2" action="1" line=""/>
<exception id="32" action="0" line=""/>
<parameter name="value">
<subParameter name="value" code="1">Algorithms.randomInteger(0, 3);</subParameter>
</parameter>
<parameter name="positionValue">
<subParameter name="value" code="0"></subParameter>
<subParameter name="unit" code="0">0</subParameter>
</parameter>
<parameter name="variable">
<subParameter name="value" code="0">myVar</subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">integer</subParameter>
</parameter>
<parameter name="colorValue">
<subParameter name="value" code="0"></subParameter>
</parameter>
</action>
<action name="ActionMessageBox">
<exception id="1" action="0" line=""/>
<exception id="0" action="0" line=""/>
<exception id="2" action="1" line=""/>
<parameter name="ifYes">
<subParameter name="line" code="0"></subParameter>
<subParameter name="action" code="0">do_nothing</subParameter>
</parameter>
<parameter name="ifNo">
<subParameter name="line" code="0"></subParameter>
<subParameter name="action" code="0">do_nothing</subParameter>
</parameter>
<parameter name="title">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="windowIcon">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="icon">
<subParameter name="value" code="0">none</subParameter>
</parameter>
<parameter name="customIcon">
<subParameter name="value" code="0"></subParameter>
</parameter>
<parameter name="type">
<subParameter name="value" code="0">ok</subParameter>
</parameter>
<parameter name="message">
<subParameter name="value" code="0">My var is: $myVar</subParameter>
</parameter>
<parameter name="textMode">
<subParameter name="value" code="0">automatic</subParameter>
</parameter>
</action>
</script>
</scriptfile>
Re: Random number
Posted: 16 Jun 2015, 11:46
by zizi
thank you.
nice