CrewXp Posted March 28, 2009 Share Posted March 28, 2009 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! Link to comment Share on other sites More sharing options...
Authenticity Posted March 28, 2009 Share Posted March 28, 2009 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. Link to comment Share on other sites More sharing options...
TerarinK Posted March 28, 2009 Share Posted March 28, 2009 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 Link to comment Share on other sites More sharing options...
rover Posted March 29, 2009 Share Posted March 29, 2009 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 http://www.autoitscript.com/forum/index.php?showtopic=92049_WinAPI_ClearConsoleClears console screen buffer with six options to clear rows and characters and set cursor position_WinAPI_CursorShowConsoleShow or hide console cursor and set cursor size I see fascists... Link to comment Share on other sites More sharing options...
CrewXp Posted March 30, 2009 Author Share Posted March 30, 2009 yea... weird timing. btw... you're awesome rover. this is exactly cool and what I needed. Link to comment Share on other sites More sharing options...
rover Posted March 31, 2009 Share Posted March 31, 2009 yea... weird timing. btw... you're awesome rover. this is exactly cool and what I needed.I'm just a small fish in a small pondbut, it is what you needed I see fascists... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now