Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
99 lines (59 sloc) 1.86 KB



The os library is a standard Lua library. It is a global library and does not need to be imported.

Refer to the official Lua documentation for more details.



The os library has been extended with some additional functions.

os.sleep( time )

Sleep execution for time milliseconds.

os.sleep(1000); path, [args] )

Open the specified file using the default program. If the path is a script or executable then it will execute it in a new window. On Windows it uses ShellExecute internally."C:\\file.txt");

It can also be used to open folder on your desktop."C:\\foo\\");

os.openall( path )

Open all of the files using the default program in the specified folder (e.g. all music files in a folder).


os.start( command, [arg1], [arg2], [...] )

Start the process or program specified by command. It fires and forgets, namely, it does not wait for the process to end nor does it capture the output or result code. For that, use the standard os.execute function instead.


On Windows command is also matched against installed applications.


Arguments can also be passed:

os.start("ipconfig", "/all");

os.script( script )

Alias for script.default.

os.script("echo \"foo\"");

os.throw( message )

Generates an error and stops the current action.

os.throw("something bad happened >.<");