ConsoleLocate()

Syntax

ConsoleLocate(x, y)
Description
Moves the cursor to the given position, in character coordinates. Any text you print after calling this function will start from the specified coordinates.

Parameters

x The horizontal position in the console to move to (starting from 0)
y The vertical position in the console to move to (starting from 0)

Return value

None.

Remarks

The console has to be in graphical mode, see EnableGraphicalConsole().

Example

  If OpenConsole()
    EnableGraphicalConsole(1)
    
    For i = 0 To 200
      ConsoleLocate(Random(79), Random(24))
      Print("*")
    Next
    
    ConsoleLocate(30, 10)
    PrintN("Press return to exit")
    Input()
  EndIf

See Also

EnableGraphicalConsole()

Supported OS

Windows

<- ConsoleError() - Console Index - ConsoleTitle() ->