Skip to content

First Steps

Loewe_111 edited this page Nov 14, 2023 · 2 revisions

Installing

to install the API, run the following command:

wget https://raw.githubusercontent.com/Loewe111/cctinker/master/cctinker.lua

you need to have HTTP enabled on your computer.

Importing

to import the API, run the following command:

local cctinker = require("cctinker")

Basic usage

Important notes

ccTinker is object-oriented, meaning you need to call functions with a colon, not a dot (screen:loop() instead of screen.loop()).

Creating a screen object

to create a screen object, run the following command:

local screen = cctinker:new(term)

you can use any terminal object, like the term itself, a monitor or a window.

The event loop

to start the event loop, run the following command:

screen:loop()

this function is blocking, so it will not return until the program is closed, or the exit function is called.

Clone this wiki locally