main
print "Hello Origo!"
system.exit
Class containing methods for accessing system specific properties.
Terminates the program.
main
print "Hello Origo!"
system.exit
Restarts the runtime environment and loads a new script binary file.
main
system.launch binary file "script.mcb"
Returns the number of milliseconds since the program startup.
main
// running == time between program startup and call to this method.
int running = system.get running time in milliseconds
Returns the current stack trace as a string.
main
string sTrace = system.get stack trace
print sTrace
Get the total amount of memory.
main
int totalMemory = system.get total memory
Get the amount of free memory available.
main
int freeMemory = system.get free memory
Get the current Unix timestamp.
main
int timestamp = system.get unix timestamp
print "Unix timestamp: " & timestamp
Get the date time object that represents the current time in the chosen timezone.
main
// Get program starting time in UTC
datetime startTime = system.get current datetime timezone UTC
print "Current year: " & startTime.get year
Returns the system default font.
main
Font defaultFont = system.get default font
// Do something with default font
Loads a bitmap font from a special image file. These files can be created using the 'Font Converter' tool in the Origo IDE menu 'Tools'.
main
Font bitmapFont = system.load bitmap font from file "bitmapFont.png"
// Do something with loaded font
Loads an origo font from a byte[] containing a special image data. These files can be created using the 'Font Converter' tool in the Origo IDE menu 'Tools'.
main
FileReader fr = new FileReader "bitmapFont.png"
Byte[] byteArray = fr.read fr.get size bytes
Font bitmapFont = system.load bitmap font from byteArray
// Do something with loaded font