User Tools

Site Tools


en:code:examples

This is an old revision of the document!


example for selection and it goes to another line.

var stuff = {
    "no": "no",
    "yes": "yes"
};
// choice no or yes.
var choice;
var dialogforAntiRaid = new InputDialog({
    title: "Anti-Raid-System #1",
    inputType: InputDialog.Items,
    items: ["no", "yes"],
    onValueChanged: function (items) {
        choice = stuff[items];
    }
});
// Variable Condition: if true go to line 1, if false go to line 10.
if (myObject == item) {
    Script.nextLine = 1;
} else {
    Script.nextLine = 10;
}
en/code/examples.1732452144.txt.gz · Last modified: 2024/11/24 12:42 by richard