User Tools

Site Tools


en:scripts:executeanotherscript

Simple example on how to execute another script inside current script. Just put those two files at the same place and in console execute: actexec main.ascr

writeText.ascr

<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
    <settings program="actiona" version="3.10.1" scriptVersion="1.1.0" os="GNU/Linux"/>
    <actions>
        <action name="ActionWriteText" version="1.0.0"/>
    </actions>
    <parameters/>
    <resources/>
    <script pauseBefore="0" pauseAfter="0">
        <action name="ActionWriteText">
            <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="noUnicodeCharacters">
                <subParameter name="value" code="0">false</subParameter>
            </parameter>
            <parameter name="pause">
                <subParameter name="value" code="0">60</subParameter>
            </parameter>
            <parameter name="text">
                <subParameter name="value" code="0">Writing this to whatever is selected atm</subParameter>
            </parameter>
        </action>
    </script>
</scriptfile>

main.ascr

<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
    <settings program="actiona" version="3.10.1" scriptVersion="1.1.0" os="GNU/Linux"/>
    <actions>
        <action name="ActionDetachedCommand" version="1.0.0"/>
        <action name="ActionCommand" version="1.0.0"/>
    </actions>
    <parameters/>
    <resources/>
    <script pauseBefore="0" pauseAfter="0">
        <action name="ActionCommand" pauseBefore="1000">
            <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="command">
                <subParameter name="value" code="0">actexec</subParameter>
            </parameter>
            <parameter name="errorOutput">
                <subParameter name="value" code="0"></subParameter>
            </parameter>
            <parameter name="exitCode">
                <subParameter name="value" code="0"></subParameter>
            </parameter>
            <parameter name="exitStatus">
                <subParameter name="value" code="0"></subParameter>
            </parameter>
            <parameter name="output">
                <subParameter name="value" code="0"></subParameter>
            </parameter>
            <parameter name="parameters">
                <subParameter name="value" code="0">writeText.ascr</subParameter>
            </parameter>
            <parameter name="processId">
                <subParameter name="value" code="0"></subParameter>
            </parameter>
            <parameter name="workingDirectory">
                <subParameter name="value" code="0"></subParameter>
            </parameter>
        </action>
    </script>
</scriptfile>

Works on linux, probably also on windows :)

en/scripts/executeanotherscript.txt · Last modified: 2022/01/06 21:00 by matjaz