/display is used to change what is on the screen. Has multiple sub-commands:
'/hide' and '/show' - Use this to hide all monitors (such as the Playground and Tray). Naturally, you can use 'show' to show monitors again.
'/background' - Changes the background of the program. Has two sub-commands
'colour' - Change the colour of the background. Use a value between 0-200. (Note 'color' also works)
'shade' - Change the shade of the background. Use a value between -100 and 100.
'write' - Displays text onto the screen at the set position. Use /position to change the said position. Has multiple sub-commands.
'text' - Writes the next input
'colour' - Change the colour of the text. Use a value between 0-200. (Note 'color' also works)
'shade' Change the shade of the text. Use a value between -100 and 100.
'font' - Change the font of the text
'sans serif'
'serif'
'align' - Change the alignment of the text
'left'
'right'
'middle'
'width' - Change the width of the text
'/ask'
Opens a prompt menu
'/ask prompt'
Opens a prompt menu with a message.
'/state'
Say something
'/wait'
Create a delay between lines of code. The number is recorded in seconds.
'/position'
Moves the position of the program. Has multiple sub-commands:
'set' - Sets a certain variable. Has more sub-commands:
'xy' - Set the x and the y in one command. Uses the next input for x and the input after that for y
'x' - Just sets the x using the next input
'y' - Just sets the y using the next input
'direction' - Change the direction using the next input
'increment' - Increment a certain variable by a set amount. Has more sub-commands:
'xy' - Increments the x and y in one commands. Uses the next input for x and the input after that for y
'x' - Just increments the x using the next input
'y' - Just increments the y using the next input
'direction' - Increment the direction by the next input
'relative' - Moves the program by a set amount in it's direction
'grab' - Grab a certain variable. Has more sub-commands:
'x' - Grab the x
'y' - Grab the y
'direction' - Grab the direction
'/pen'
Draw on the screen. Has multiple sub-commands:
'up' - Lift the pen up off the screen
'down' - Place the pen on the paper
'clear' - Erase all drawings on the screen.
'colour' - Change the colour of the pen. (Note 'color' also works)
'size' - Change the size of the pen.
'shade' - Change the shade of the pen. Use a value between -50 and 50.
'transparency' - Change the transparency of the pen
'saturation' - Change the saturation of the pen
'increment' - Increment a certain variable. Has more sub-commands:
'colour' - Change the colour of the pen. (Note 'color' also works)
'size' - Change the size of the pen.
'shade' - Change the shade of the pen. Use a value between -50 and 50.
'transparency' - Change the transparency of the pen
'saturation' - Change the saturation of the pen
'/loop'
Loops the a set script a set amount of times, which is specified by the first input. Use '/loop end' to close the loop.
'/evaluate'
Completes a mathematical function. Uses the JS 'evaluate' command, but will block JS code. You can use inputs as a one line formula such as 4x5/10 or sin(1)
'/dev'
Some advanced commands that can change how KoKo works. Has multiple sub-commands:
'extension' - Manage extensions that can add extra commands. Has more sub-commands:
'add' - Add an extension
'remove' - Remove an extension
'sentinel' - Manage the inbuilt security system when running KoKo. Has more sub-commands:
'on' - Turn sentinel on (default)
'off' - Turn sentinel off
'/fetch'
Fetch something from the internet using the provided URL. For testing, a raw GitHub Gist is useful.
'/iframe'
Display a website onto the screen. Has multiple sub-commands:
'open' - Opens a website using the provided URL
'close' - Closes the website
'hide' - Hides the website
'show' - Shows the website
'position' - Moves the website to the program's position
'width' - Change the width of the website
'height' - Change the height of the website
'interactive' - Toggles if the website is interactive. Some commands that rely of the position of the mouse and if the mouse is down may not work if the website is interactive. Has more sub-commands:
'on' - Turn interactivity on
'off' - Turb interactivity off
'grab' - Grab some data about the iframe. Has more sub-commands:
'url' - Get the URL of the website that you are currently displaying
'visible?' - Check if the iframe is hidden or not
'x' - Get the x position of the iframe
'y' - Get the y position of the iframe
'width' - Get the width of the iframe
'height' - Get the height of the iframe
'interactive?' - Check if the iframe is interactive
'/isound'
Play a sound from a provided URL.
'/runtime'
Useful commands that can tell KoKo how to run the program. Has multiple sub-commands:
'kill' - Kill the program
'fps' - Limit the framerate of the program
'turbo' - Toggle if turbo mode is on or off. Has more sub-commands:
'on' - Turn on turbo mode
'off' - Turn off turbo mode
'username' - Change the user's username.
'wakelock' - Turn wakelock on or off. Wakelock stops the user's device from sleeping. Has more sub-commands:
'on' - Turn wakelock on
'off' - Turn wakelock off
'grab' - Grab some data from how the project is running. Has more sub-commands:
'turbo?' - Get if turbo mode is on or off
'username' - Get the user's username
'wakelock?' - Check if wakelock is on
'/keysim'
Simulate key presses and mouse clicks. Has multiple sub-commands:
'press' - Press a specified key
'click' - Click a mouse button. Has more sub-commands:
'left' - Simulate a left click
'middle' - Simulate a middle click
'right' - Simulate a right click
'lock' - Lock the mouse cursor. Has more sub-commands:
'on' - Lock the pointer
'off' - Unlock the pointer
'grab' - Gets some data about keysim. Has more sub-commands:
'lock?' - Check if the pointer is locked
'/variable'
Manage runtime variables. Has multiple sub-commands:
'create' - Create a runtime variable
'set' - Set a variable
'delete' - Delete a runtime variable
'increment' - Increment a variable by an amount
'delete all' - Delete all variables
'grab' - Grab the value of a variable
'variable' - Get the value of a variable
'active variables' - Get a list of all the active variables