Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Button handy
blanktrue
color#0052CC
nameSend Feedback
linkhttps://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=Using+SIL+Runner+Gadget+-+490998687
widthauto

When you select a script from the list, the Description field will automatically be filled in.

The Parameters field is used to pass values into your SIL™ program. To add a parameter click the Add Parameter button.

Note

Notes

  • Parameter names must be unique, otherwise the most recent definition will overwrite the previous ones. This includes parameters with no name.

  • You can customize the gadget to be more user friendly, by asking parameters in a different way. You can find more details here.


The parameters will be passed into the program using the argv variable. The values will be available using a construct like argv["parameter_name"] or argv[position]. For the above example, the number of rockets can be retrieved using argv["groupname"] or argv[2]. You can reorder the parameters using drag and drop.

Once you run the script, the program console will be displayed.

Tip

You can use the RunnerLog function to print info in the console as the program runs. Note that the console buffer is limited to 512 lines every ~0.5 sec and the console will only display the latest 512 lines.

Example code
Code Block
runnerLog("Preparing to start a war...");

runnerLog("Building tanks...");
runnerLog("Built " + argv["tanks"] + " tanks.");

runnerLog("Gathering infantry...");
runnerLog("Gathered " + argv["infantry"] + " brave men.");

runnerLog("Fueling rockets...");
runnerLog(argv["rockets"] + " ready.");

runnerLog("Dispatching orders...");
return "Good job! The world is now at war!";
Tip

Tip

You can return as many values as you need, regardless of their type.

See More

Child pages (Children Display)
pageSIL Runner Gadget

...