Page 1 of 1

Requst expanded CONSOLE functionality

Posted: Thu May 16, 2013 5:30 pm
by jmcbride
I do alot of writing for CLI applications and I find the console support of Purebasic needing a revisit.

It'd be nice to:

1 - query the screen size

2 - turn on or off screen scroll

3 - support ANSI graphics

4 - And be able to place the cursor anywhere on the screen with simple PRINT@ or LOCATE@ statements.

5 - a clear screen command.

Re: Requst expanded CONSOLE functionality

Posted: Thu May 16, 2013 6:15 pm
by c4s
Check out the help file under the "Console" topic - e.g. ClearConsole() and ConsoleLocate() are already implemented.
You'll most likely find the other commands you are searching for in this forum. There is plenty of helpful code from other users! 8)

Re: Requst expanded CONSOLE functionality

Posted: Thu May 16, 2013 10:30 pm
by jmcbride
Actually, I did better than that. :D


I read the documentation for the console library and is says for use in graphic mode. It does not mention text mode, which is what I work in and thus the reason for my suggestion.

Re: Requst expanded CONSOLE functionality

Posted: Fri May 17, 2013 12:09 am
by Demivec
jmcbride wrote:I read the documentation for the console library and is says for use in graphic mode. It does not mention text mode, which is what I work in and thus the reason for my suggestion.
Maybe you can enable the graphic console mode, do a few things then disable it again for your other console stuff.

Re: Requst expanded CONSOLE functionality

Posted: Fri May 17, 2013 7:50 am
by es_91
Afaik text mode can by system default not do the operations you mentioned.

Re: Requst expanded CONSOLE functionality

Posted: Fri May 17, 2013 8:11 am
by buddymatkona
@jmcbride
Aside from ANSI terminal type graphics, I can not tell what you want PB to do that it does not already do.
For example, "be able to place the cursor anywhere on the screen with simple PRINT@ or LOCATE@ statements" is as easy as

Code: Select all

ConsoleLocate(StartChar , LineNum) : Print(" Some Text")
Were you perhaps thinking "Graphical" means you have to use point or pixel coordinates? ConsoleLocate(I,J) works like "I" characters and "J" lines on the screen.

Maybe if you could show a small snippet of what you need that PB can not do, it would be clearer.