View Full Version : console text screen size
sandyrepope
14-02-2007, 23:51
What I've been trying to find out in help is this: Just how many columns and rows do I have to use in the console?
Is there only one size for us to use?
Is it possible to set the console to a certain size, text wise?
Does console have a graphics screen?
Thanks
Sandy
Sandy, thinBasic has a core module and lots of additional modules. To get right into console development, here is the easiest way.
Both in the the thinbasic help and in the sample scripts folder, the help and samples are arranged by module. So in both cases if you refer to the console module help section, you will find all the commands available specifically for console programming.
The console sample folder has lots of examples to get you going.
I am refering you to those as there is lots there and no need to repeat here.
A script you might want to look in the sample folder would be:
C:\thinBasic\SampleScripts\Console\Console_Info.tbasic
On my computer I get an 80 X 300 as chars per line and lines. I know there are scroll features that might allow you to have more with buffers, but I am not sure.
About graphics, there is a box command and I don't see anything else.
I am sure others more knowledgable can answer those for you.
ErosOlmi
15-02-2007, 08:52
Hi Sandy.
First the negative side: we do not have a graphic screen on consoles window. thinBasic Console module uses just operating system console api functions.
That said, your request to have a graphic screen it is very intriguing. I have a commercial 3rd party dll that does that overimposing to console window a graphic control. I will study it and see what I will be able to achieve. But it will take some time.
thinBasic console module comes with 2 versions depending on the OS you are using. When you have installed thinBasic, setup process had determined which console module version to install: Win9x or WinNT version. This because console windows api changed a lot during OS evolution and some functionalities works different in different OSs.
Console sceen size can be changed even during script runtime using Console_SetScreenBufferSize function. I just realize help info are very bad on console and I will work on it right now. In the mean time please find attached a little console example that shows setting console size and area scrolling.
Ciao
Eros
ErosOlmi
15-02-2007, 08:57
I've added a Console specific forum in order to keep all console related requests all together.
Eros
nifty demo, looks high tech in a strange way, I liked it!!
sandyrepope
15-02-2007, 17:26
Thanks for the replies. They help a lot. I especially like the idea of a console forum. It will help by keeping all console related information together and easier to use.
Thanks for the example. It will help me learn more about the console and how to use it.
I hope to be able to make some programs that will show how to use some of the available commands in a way that beginners, such as myself, can get a better understanding about how to do things.
I've decided that I really like thinBasic and want to learn as much as I can about it.
Thanks
Sandy
ErosOlmi
15-02-2007, 17:50
Sandy,
we are very happy about that. Please feel free to ask here whatever you need.
Many items are not yet covered by help file or by example. This will be a good chance to do it.
Thanks
Eros
PS:
I've already implemented in help file RND function info and some of the missing Console functionalities.
They will be present in next release.
Sandy,
Eros puts out lots of updates quickly, so check back often, you will be really surprised and pleased with the great interactivity with such great developers as Eros and Roberto for thinBasic and Petr for the tbgl module.
RobertoBianchi
15-02-2007, 18:52
Hi Sandy,
indeed ThinBASIC modules are always under development, therefore if you need more functionality please let us know.
Regards,
Roberto
ErosOlmi
16-02-2007, 01:26
Sandy,
regarding graphic screen in Console, plase also remember you can create a Console window and an OpenGl window using TBGL module. You can also create a window dialog with buttons, lists, menues and at the same time create and use Console commands in a console window.
This is one of the advantages to have interpreted languages: most of the problems will be resolved by the interpreter with high level functions that do quite complex tasks in single keywords. At least, this is one of the aspects we try to achieve :D
I will post a little example tomorrow (too tired this night, sorry) about using console window and TBGL and/or a dialog window at the same time. TBGL chart sources can be a good example.
Ciao
Eros
ErosOlmi
16-02-2007, 14:15
OK, I had some spare time to modify a TBGL example from Petr adding console usage and OpenGL window.
It is just an example but many other can be created.
So even if we have no graphics inside a pure console window, we can mix console, opengl, gui interface all in the same script.
Ciao
Eros
PS: you need latest thinBasic preview version 1.2.0.1 to execute this script because of new TBGL mouse functions.
Today is a day for cool examples, another nice one Eros, thanks!1