Requst expanded CONSOLE functionality

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
jmcbride
New User
New User
Posts: 9
Joined: Sun May 05, 2013 9:26 pm

Requst expanded CONSOLE functionality

Post 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.
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: Requst expanded CONSOLE functionality

Post 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)
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
jmcbride
New User
New User
Posts: 9
Joined: Sun May 05, 2013 9:26 pm

Re: Requst expanded CONSOLE functionality

Post 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.
User avatar
Demivec
Addict
Addict
Posts: 4261
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Requst expanded CONSOLE functionality

Post 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.
es_91
Enthusiast
Enthusiast
Posts: 298
Joined: Thu Jan 27, 2011 12:00 pm
Location: DE

Re: Requst expanded CONSOLE functionality

Post by es_91 »

Afaik text mode can by system default not do the operations you mentioned.
:mrgreen:
buddymatkona
Enthusiast
Enthusiast
Posts: 252
Joined: Mon Aug 16, 2010 4:29 am

Re: Requst expanded CONSOLE functionality

Post 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.
Post Reply