using bottom line for status bar

Aug 16, 2008

I'd like to implement a simple kind of status bar in the bottom line of the console window (using pre_input and scrput). Is there a way to tell TCC not to display the prompt on the last line? (because it overwrites the status bar)
May 20, 2008
Syracuse, NY, USA

I'd like to implement a simple kind of status bar in the bottom line of the console window (using pre_input and scrput). Is there a way to tell TCC not to display the prompt on the last line? (because it overwrites the status bar)
I don't think there's a built-it way (I hope I'm wrong). I simply don't like the prompt on the last line. I did it in my 4CONSOLE plugin a while back but removed it because I didn't want to force it on all users of 4CONSOLE.

I think this is what I did, in a plugin keystroke handler
if ( csbi.dwCursorPosition.Y == csbi.srWindow.Bottom || (csbi.dwCursorPosition.Y == csbi.srWindow.Bottom-1 && csbi.dwCursorPosition.X == csbi.dwSize.X-1 ))
   SendMessage(g.hWndConsole, WM_VSCROLL, MAKEWPARAM(SB_LINEDOWN, 0), NULL);

But I must wonder ... What happens if the status bar is on the last line, the prompt is on the next-to-last line, and you type a command longer than one line? Without some intervention I'd expect the command to overwrite the status line.
Hi Thorsten,

it would be easier IMHO to display your status info at the top of the console and nail the input line to or near the bottom. In 4DOS times there were very elaborate ANSI prompt sequences to do just that.

The advantage is that you will find your input line always at the same position, you can use CLS to paint the whole console the color you like, you'll see the input and output of preceding commands, you won't overwrite your status line (though it may scroll off for very long inputs).
Aug 16, 2008
You convinced me: I switched from bottom to top. The "status bar" (not real one as it is only updated when executing a command) is finished now (at least for the moment). The code is not exactly pretty but maintainable. Attached the tmux original and my attempt to recreate that in TCC.

The "styling" of the status bar items (CapacityUnitPercentage%) is taken from Byobu (which is a kind of pre-configured Tmux). Thanks to everyone who helped!!

tcc status bar.png
Zsh in tmux status bar.png


  • Zsh in tmux status bar.png
    Zsh in tmux status bar.png
    69.5 KB · Views: 90
Similar threads
Thread starter Title Forum Replies Date
redwdc A comment on using shell folders Support 1
Jesse Heines Using Regular Expressions with the REN commanc Support 8
R WAD Unusable state when using Chinese characters Support 3
Joe Caverly Using TYPE with non-English text Support 22
L Using TCC.exe through an SSH connection Support 3
Joe Caverly Using @PSHELL from @EVAL Support 8
Jay Sage Command Will Not Run Using Short Name of Path Support 5
Jay Sage Cannot Postion Cursor in Command Line Using Mouse Support 7
MikeBaas Using the debugger Support 2
Joe Caverly Multiple Text Searches at once using FFIND or TPIPE Support 4
Dick Johnson Using the @instr function Support 5
Joe Caverly Using this CMD technique from TCC Support 17
Joe Caverly What version and Windows OS are you using? Support 3
Craig Fitzgerald Problems using tcstart.btm Support 3
R How to? Append files in multiple subfolders using copy? Support 8
M Ctrl-C when using command line history does nothing Support 2
Joe Caverly Using a Directory Alias with @iniwrite fails Support 14
C French accents using msgbox Support 4
C "Failed to update the system registry. Please try using REGEDIT" Support 3
x13 Problem listing repository files using DIR http(s)://... Support 8
R Regex using ^ Support 2
cxxl WAD Mouse movement sluggish when using TCC list Support 3
jfalch WAD internal "which" should check for FILEEXIST when using AppPaths entry Support 8
D How to? Scale font in TCC using wheel mouse or other means Support 2
fpefpe Documentation copy/move using /c or /u Support 2
gschizas Fixed Using codepage 65001 (UTF-8) breaks non-ASCII characters Support 8
D How to? Use typed envars using regex. Support 3
epement Using "everything" Support 10
U Installing the Compaq Visual Fortran 6.0 compiler using Take Command Support 8
Alexander WAD The number of files and dirs are multiplied when using multiple wildcards Support 6
A How to? How do you launch TCC/LE using the already-open instance? Support 5
rps Fixed Using last argument variable ! Support 5
M Incorrect ARGV1 when using linux-style paths Support 4
D How to? Using a custom ini file with TCC from Take Command Support 7
thedave WAD Unable to type various characters using Windows 8's onscreen keyboard Support 7
D Documentation Using "send all input to other tabs" Support 11
Joe Caverly Word Count using TPIPE Support 10
Phileosophos Fixed Option Dialog Hangs when Using Help Support 7
MickeyF problem using COM object in VBScript from v16 x64 TCC but not from v15 32-bit TCC Support 4
S How to? How do I distinguish missing source file from download error when using HTTP? Support 6
Jay Sage Using EVERYTHING Command in TCMD15 Support 5
Charles Dye Odd behavior after using OPTION "Advanced" tab Support 2
T How to? Using FOLDERMONITOR 1 event causes multiple trigger(ing)s Support 8
samintz WAD FILEWRITE using SMOPEN Support 1
ehab aboudaya How to? 2 GUI questions and return HWND using TakeCommandIPC Support 3
R Fixed Using %~dp1 for paths with unavailable drives Support 6
C Using dif. sending addresses with sendmail Support 11
R TC 13 / Using TCDIALOG to exit commands Support 4
epement Video tutorials of using Take Command Support 2
electrotype Error using TCC: "Label not found" Support 6

Similar threads