Skip to main content

Host System

Which is the real computer system that runs the LIKO-12 program.

Write into the console

There's a text console which can be used to output debugging information to.

info

To view the console run LIKO-12 from a terminal.

Or on Windows you can use LIKO-12_Console.exe which opens a separate console window.

cprint

Print into the developer terminal.

Identical to the standard Lua print function. (in fact it's the standard print function).

cprint(text, ...)
ParameterTypeDefaultNote
textanynil
...anyvarargany extra values will be prefixed with the \t (tab) character.

Access the clipboard

clipboard

Get the content of the clipboard

content = clipboard()
ReturnTypeNote
contentstring, nilnil if it's empty.

Set the content of the clipboard

clipboard(content)
ParameterTypeDefaultNote
contentstring⚠️ required

clearClipboard

Clear the content of the clipboard.

clearClipboard()

Query Information

getFPS

Get the current frame per second rate.

framesPerSecond = getFPS()
ReturnTypeNote
framesPerSecondnumber

getHostOS

Detect the type of system which LIKO-12 is running on.

osName = getHostOS()
ReturnTypeNote
osNamestringenum: 'Windows', 'Linux', 'OS X', 'Android', 'iOS'

isMobile

Detect if LIKO-12 is running on a mobile device or not. (Which is an Android or iOS device).

isIt = isMobile()
ReturnTypeNote
isItboolean

getSaveDirectory

Get the directory which LIKO-12 uses in the host system to store it's data (the appdata directory).

path = getSaveDirectory()
ReturnTypeNote
pathstring

Open URLs and directories

openURL

Open a webpage using the default browser in the host system.

info

Please don't abuse this function.

openURL(url)
ParameterTypeDefaultNote
urlstring⚠️ requirede.x: https://example.com/

openAppdata

Open a directory from the LIKO-12's appdata folder using the file explorer of the host system.

If you wish to open a directory from LIKO-12's virtual filesystem, it's located in drives/[driveLetter]/....

openAppdata(path)
ParameterTypeDefaultNote
pathstring⚠️ required