Skip to content
Gilberto Romero edited this page Aug 31, 2016 · 3 revisions

System API Functions

system.restart( )

Restarts the computer.

system.shutdown( )

Shuts the computer down.

system.pushEvent( string EventName, ... )

Returns: boolean Success

Pushes an event into the event queue. Returns a boolean value, with the value being true if the event was successfully put into the queue. If the value was false, that means the queue has too many events in it as it is.

system.startTimer( number time )

Returns: number TimerID

The value given for time is recognized as seconds. When using this function, an event will be queued once the timer has gone off, with the second argument of the event being the TimerID given to you.

system.cancelTimer( number timerID )

This cancels a timer, preventing it from queuing an event before it has gone off.

system.playTone( number frequency, number amplitude, number durationSeconds )

Returns: boolean Success

Plays a tone of the specified frequency. If amplitude or duration are not given, they are assumed to 1. The system can only play one tone at a time, making this mostly useful for notifications and debugging.

system.address( )

Returns: string Address

The address (mostly) follows the format of a UUID; xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

Clone this wiki locally