Console exe up / down history

Sep 8, 2008
30
0
I have a simple console application. When I run in tcc and when there is a prompt from my console.exe, the up/down show history. However, with Take Command the up/down do not show history. Any ideas why?
 

rconn

Administrator
Staff member
May 14, 2008
12,404
152
I don't understand what you're doing here - TCC is not going to show command history if you're in another app, whether or not it's in a TCMD tab window. You'll only get history if you're at the TCC prompt.

You can send the app to support@jpsoft.com & more details on what you're doing, but from what I've seen so far I don't think this is a supported environment.
 
May 20, 2008
11,529
102
Syracuse, NY, USA
Hmmm! I'm curious here. You get a history mechanism free in a console app (I never knew that!). This little app (below) has a working Up (HistPrev), Dn (HistNext), and F9 (goto history line) ... maybe more. But it works just as well in TCMD as in a stand-alone console (even the console-based F9 "dialog"). So I still wonder what gmorris59's issue is.

INT wmain ( INT argc, LPWSTR *argv )
{
WCHAR buf[256];
while (TRUE)
{
_getws_s(buf, 256);
wprintf(L"%s\n", buf);
}
return 0;
}

I always wondered what the console's Properties\Options\CommandHistory\BufferSize was all about. Now I know; it's all about this free history mechanism.
 
Sep 8, 2008
30
0
I wrote exactly the same in C# and its good that the "local history" within the application works. However for me sometimes it does not work and I can;'t understand particularly when the app is so small
 

rconn

Administrator
Staff member
May 14, 2008
12,404
152
Windows provides some (limited) history and line editing features with the ReadConsole API. This is what CMD uses (and any apps that use ReadConsole to get their input). TCC has an .INI option to use that API if you really want bad line editing, but normally TCC reads the console input a character at a time and does its own editing & history recall.
 
Similar threads
Thread starter Title Forum Replies Date
M Console-Mode (*.exe) works in TCC, not in TCMD Support 2
vefatica Console not redrawn in BTM or with multiple commands Support 4
vefatica ShutdownPlugin not called when I X the console? (just curious) Support 4
vefatica Console popup windows don't work correctly Support 0
vefatica Cancelling selection in the console? Support 7
vefatica Console cursor height in Win 10 Support 3
vefatica BTM, elevated, console window caption? Support 4
vefatica TCEXIT not executed if I X the console Support 4
vefatica TYPE resets console tab settings Support 14
vefatica Undesired scrolling in Windows 10 enhanced console. Support 2
L WAD In console, tabs are rendered with non-uniform tab-stop spacing Support 16
P No linefeed on last line of console window Support 2
fishman@panix.com TCC v22 & the Windows 10 Console Support 5
C TCMD not hiding the console Support 1
jaltman tcmd 21.0.19 win10 16179 console window loses content Support 2
vefatica Console output slower that before Support 8
L Fixed console line length in Take Command 19? Support 3
P Color directories in Win10 build 10586 console Support 11
Mordachai How to capture all console output from a TCMD session? Support 4
I Windows 10 console does not allow alt-F4 alias to complete Support 1
vefatica ON CLOSE, GOTO, and X-ing the console Support 5
I Attach console Support 3
C Screens of different size and hidden console Support 8
G Bug? TCC 16.03.55 Console Palette Support 4
C TCMD: Problem attaching console Support 4
vefatica OT: Windows console history? Support 7
D Console window titles / tab caption Support 4
vefatica ON <closing the console> Support 5
J Screen Capture (Console Mode) Support 5
vefatica Complete console caption as TCMD's caption? Support 1
Mordachai How to get a TC interface instead of a console for .btm, .bat, ? Support 10
fpefpe How to? Fonts / Size in console window Support 5
A How to? Is it possible to freeze one side of the console? Support 19
Stefano Piccardi How to? keep console from scrolling Support 6
noahcoad @ruby closes console Support 2
noahcoad Start new console without focus Support 3
vefatica TCSH crashes only when in a TCC console Support 2
vefatica Very strange console font corruption Support 3
p.f.moore Is the TakeCommandIPC interface available from other console programs? Support 3
J How to? 'tab' characters in the console and clipboard 'copy' Support 1
vefatica Console not closing ... problem gone Support 1
T Wrong prompt in Windows command console Support 3
vefatica Console not closing Support 1
E Redirect output from "start"-ed console Support 5
vefatica Hidden console doesn't close Support 34
J Console editor for TCC12 Support 10
J TC12 Win7 console, running gawk scripts Support 0
lassevk exit(1) in a python script exits console, by design or bug? Support 1
M Programmatically getting the console width in character Support 18
nikbackm TCMD console color palette Support 4

Similar threads