Scriptomatix add some features to Qml language. They are avaliable from parameters pannel.

Read/write file

Class : QmlFile 0.1

Properties :

Signals :

Methods :

Example :
import QmlFile 0.1
    FileIO     { id: io }
    function writeFile(filename,content) {
        io.setSource(filename);
        io.setText(content);
        io.write();
    }
    function readFile(filename) {
        io.setSource(filename);
        if (io.exists()) {
            io.read();
            return io.text;
        } else {
            return "";
        }
    }
take a look at /usr/share/scriptomatix/examples/Ping-list.qml

Launch process

Class : QmlProcess 0.1

Properties :

Signals :

Methods :

Example :
import QmlProcess 0.1
    Process {
        id: myprocess
        shell: "/bin/bash"
        command: "ls *.txt"
        onFinished: mytext.text = myprocess.readAllStandardOutput()
    }
    Text {
        id: mytext
        anchors.margins: 5
        anchors.fill: parent;
    }
    Component.onCompleted: {
        myprocess.start();
    }

Environment variables

Class : QmlEnvVars 0.1

Methods :

Example :
import QmlEnvVars 0.1
    ShellEnv   { id: environment }
    Text {
        id: mytext
        anchors.margins: 5
        anchors.fill: parent;
        text: environment.getVar("HOME")
    }
take a look at /usr/share/scriptomatix/examples/FileInfo.qml

Internal variables and functions access

Example :
    sx_scriptargs = str;        // Set global variable sx_scriptargs
    sx_execAction.trigger();    // Trigger script execution
take a look at /usr/share/scriptomatix/examples/Ping-radio.qml function updateParams