Package Script

package for the script environment

Methods

argument(integer index) returns a command line argument.
exit(integer code) immediately end the script process.
reload() reload the entire script.
resolve(string path) resolves the given path relative to the current script file location.
schedule(function function, instance context, float measure, Time.Clock clock) schedule a function to execute in a given context at the given time.
schedule(function function, float measure, Time.Clock clock) schedule a function to execute in the script context at the given time.
stayAlive() keep the script process alive until explicitly terminated

Classes

Method Documentation


string argument(integer index)

Returns a command line argument.

Parameters

Returns


void exit(integer code)

Immediately end the script process.

Parameters


void reload()

Reload the entire script.


IO.Path resolve(string path)

Resolves the given path relative to the current script file location.

Parameters

Returns


void schedule(function function, instance context, float measure, Time.Clock clock)

Schedule a function to execute in a given context at the given time.

Parameters


void schedule(function function, float measure, Time.Clock clock)

Schedule a function to execute in the script context at the given time.

Parameters


void stayAlive()

Keep the script process alive until explicitly terminated.

A script with no scheduled events will normally terminate immediately after the end of the script, use this method to keep the script process alive for method handlers.

The script process must then be terminated externally (e.g. via signal) or by calling System.exit in a method handler.



Creative Commons Logo This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.