Sign in to follow this  
Followers 0
CrewXp

How would YOU write to the console? Erasing the old text for the new? Possible? Like a Label kind of.

6 posts in this topic

Hey, I'm interested in creating a program that shows active stats. I write the statistics to the console using ConsoleWrite, but ConsoleWrite only writes to a new line each time. Because my program runs quick, I can't really read the statistics. It just scrolls down EVERYTHING too fast for me to read it in order to show the new text.

Is there any way to Write to the console without going to a new position? I tried using a GUI with labels, but labels' font is too.. ugly.(sry, im picky on visual aesthetics). I like the 'developer' look of a console application.

Example: For linux users, if you type 'top', you get a console window that shows active stats, where it deletes old statistics in a certain positions and shows the active percentages. It doesn't 'log' strings to the screen, it works like labels in a gui does.

...Hope this makes sense. THANKS!

Share this post


Link to post
Share on other sites



Maybe there is a command, it's unlikely though, because ConsoleWrite seems to send raw data. This is for example why sending * and @LF won't open the parameter window:

Dim $hWnd = WinGetHandle('[CLASS:SciTEWindow]')
Dim $hScintilla2 = ControlGetHandle($hWnd, '', 'Scintilla2')

For $i = 1 To 5
    ConsoleWrite('Data' & $i & @TAB)
Next

ConsoleWrite(@LF)
Sleep(1000)

ControlSetText  ($hWnd, '', $hScintilla2, '')
ConsoleWrite('BlahBlah' & @LF)
Sleep(1000)

The only thing I can think of.

Share this post


Link to post
Share on other sites

First the font is up to you, you can change the font by using GUICtrlSetFont, read the help file for what you can change it to. To do the same thing which top in Linux does is find how much it updates and based off of that you know have a standard because each stat on the linux screen doesn't do a independent figuring, just wouldn't be that good for to multitask then. If you do it under your application you can get either by ControlSetText(if your doing it from a outside function) or GUICtrlSetData (if you created the application and want to do it internally).

If you want to keep the stats you could also then write up a file and selectively choose between the two array based off what changed those keep the log for when it crashes or exits, best of all you should be able to do it with both your application or consolewrite.


0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

Share this post


Link to post
Share on other sites

Hey, I'm interested in creating a program that shows active stats. I write the statistics to the console using ConsoleWrite, but ConsoleWrite only writes to a new line each time. Because my program runs quick, I can't really read the statistics. It just scrolls down EVERYTHING too fast for me to read it in order to show the new text.

Is there any way to Write to the console without going to a new position? I tried using a GUI with labels, but labels' font is too.. ugly.(sry, im picky on visual aesthetics). I like the 'developer' look of a console application.

Example: For linux users, if you type 'top', you get a console window that shows active stats, where it deletes old statistics in a certain positions and shows the active percentages. It doesn't 'log' strings to the screen, it works like labels in a gui does.

...Hope this makes sense. THANKS!

rather prescient timing CrewXp :D

http://www.autoitscript.com/forum/index.php?showtopic=92049

_WinAPI_ClearConsole

Clears console screen buffer with six options to clear rows and characters and set cursor position

_WinAPI_CursorShowConsole

Show or hide console cursor and set cursor size


I see fascists...

Share this post


Link to post
Share on other sites

yea... weird timing. :D

btw... you're awesome rover. this is exactly cool and what I needed.

Share this post


Link to post
Share on other sites

yea... weird timing. :D

btw... you're awesome rover. this is exactly cool and what I needed.

I'm just a small fish in a small pond

but, it is what you needed


I see fascists...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0