Hey again!
Wow, today i have worked some of my nigh time to finish my work
The console utils dll now support most used functions...
These are the functions:
OPEN CONSOLE
* Opens the console-
CLOSE CONSOLE
* CLOSES the console-
PRINT CONSOLE <TEXT AS STRING>
* Prints an specified text to the console
INPUT CONSOLE() AS STRING
* Read an user typed text and wait for return key.
Return the string.
SET CONSOLE COLOR <COLOR AS INTEGER>
* Changes the text and background colors for the console,
wheres COLOR is an integer value specifing the color..
these values are:
0 = White on Black
1 = Red on Black
2 = Green on Black
3 = Yellow on Black
4 = Blue on Black
5 = Magenta on Black
6 = Cyan on Black
7 = Black on Gray
8 = Black on White
9 = Red on White
10 = Green on White
11 = Yellow on White
12 = Blue on White
13 = Magenta on White
14 = Cyan on White
15 = White on White
GET CONSOLE COLOR() AS INTEGER
* Return the actual color value, 0 to 15
IS CONSOLE OPENED() AS BYTE
* Return 1 if the console is opened or 0 if its closed.
CLEAR CONSOLE
* Clears the console window to white on black and put the
cursor on the begining.
CLEAR CONSOLE COLOR <COLOR AS INTEGER>
* Clears the console window, but to the specified
combination of colors based on the set console
colors parameters.
LOCATE CONSOLE <XPOS AS INTEGER>,<YPOS AS INTEGER>
* Locates the cursor to the specified position and start
printing on this position.
ENVIRON$(VARNAME AS STRING) AS STRING
* Returns the specified enviroment variable string value
SETENV VARNAME AS STRING,VALUE AS STRING
* Sets a new enviroment variable value.
I have moved Environ$ and Setenv functions to console functions because are more (adecueted)
I need clear a little my code and do some things dinamically to make the dll smaller.. i think the dll can be 3kb instead 6.. but i need do some changes in the variables...
The source code (GPL'ed) and examples are still on the zip.
Maybe later ill make an installer with everything needed to install and start work with console functions under darkbasic
Well, i hope this can help every body to debug and, i dont know, maybe do some console thing before run your 3d apps games
http://www.zonauy.com/darkbasic/consoleutils.zip
Enjoy!
Roberto A. Berrospe Machin, Zona Servicios.