reCT

The only ByteSpace Project big enough to have its
own Website

Sys Package

Include this Package with


package sys;

[i] This package includes most of the fundamental things, like Console functions and things like Sleep().


Print(text string)

Print will Write a message out to the Console, and go to the next line.


Write(text string)

Write will Write a message out to the Console and will stay on the same line.


Input()

Will let the user type a line, and return it as a String.


InputKey()

Will let the user type a character and return it as a String.


InputAction()

Will let the user type a character, but without showing it in the console and return it as a String.


Read()

Will read from the raw console standard input stream character by characterand return the char as an int.


Clear()

Clears all text from the Console.


Sleep(milliseconds int)

Will pause the Thread for the given amount of Milliseconds.


Beep(freq int, duration int)

Plays the given Frequency for the given amount of Time, using the Console's beeper.


Char(asciiCode int)

Will return the Character corresponding to the given ASCII code as a String.


Arg(index int)

Will return the commandline argument at the given index as a string. (NOTE: the first argument is always the path of the executable)


Args()

Will return all commandline arguments as a string array.


SetSize(width int, height int)

SetSize will set the Size of the Console window to the given Width and Height. (Please note that the inputs are in Characters, not Pixels)


GetSizeX()

Will get the Width of the Console in Characters and return it as an Int.


GetSizeY()

Will get the Height of the Console in Characters and return it as an Int.


SetCursor(x int, y int)

Sets the Console's Cursor to the given Position.


GetCursorX()

Will get the X coordinate of the Console's Cursor.


GetCursorY()

Will get the Y coordinate of the Console's Cursor.


SetCursorVisible(state bool)

Sets the Console's Cursor visibility.


GetCursorVisible()

Gets the Console's Cursor visibility and returns it as a Bool.


SetConsoleForeground(color int)

Sets the Console's Foreground color.


SetConsoleBackground(color int)

Sets the Console's Background color.


ReCTs Colortable

ReCT has 16 different colors you can use in the Console. Here is an overview of them:


LaunchApplication(path string)

Will launch the application at the given path in a seperate process.


LaunchApplicationWithArgs(path string, args string, waitForEnd bool)

Will launch the application at the given path with the given arguments in a seperate process. If the wait bool is set, the program will be paused until the process finishes.


LaunchApplicationWithOutput(path string, args string)

Will launch the application at the given path with the given arguments in a seperate process and will wait until it is done, after that it returns the processes output as a string.