Name
SetConsoleCursor -- set console cursor position (V10.0)
Synopsis
SetConsoleCursor(x, y)
Platforms
Linux, macOS, Windows

Function
This function moves the cursor of the current window to the location specified by x and y. This does not move the physical cursor of the terminal until RefreshConsole() is called. The position specified is relative to the upper left corner of the window, which is (0,0).

You must enable advanced console mode using EnableAdvancedConsole() before you can use this function. See EnableAdvancedConsole for details.

Inputs
x
desired x position
y
desired y position
Example
EnableAdvancedConsole()
w, h = GetConsoleSize()
s$ = "Hello World!"
SetConsoleCursor((w - StrLen(s$)) / 2, h / 2)
ConsolePrintNR(s$)
RefreshConsole()
The code above prints the string "Hello World" centered in the console.

Show TOC