Is there something in FreeBasic or FBide that prevents my scrolling back to see previous lines printed? It seems I used to be able to do this but along the way something must have changed (Windows 11, new ver of FB, or ...). I can only go back 3 or 4 lines of scroll history now. I set the scroll line count for CMD to 9001 but no juice. For example, the simple program below only permits me to view the last 50 lines or so. It seems there is some kind of reset for each screen page going on. If I do this for a series of command lines like DIR, I am able to see as much history as I want.
You must change a property of the Command Prompt Window (the one which is opened for the code execution):
- To do this, you will simply need to right-click on the top portion of the Command Prompt Window and hit the “Properties” link that is located on the right-click menu that appears.
- Open the Layout tab, and adjust the height of the buffer size as you want (>1000 for your above example).
- Click OK to save the change.
Re-execute your code.
Yes, did that too - at least I thought so. Not sure why that is so but I did that as well - unless I need to change it WHILE executing.
Update: did that too, no go. Changes another setting on rendering engine. That had no effect.
I'm missing something ... or it is something else.
Funny thing is that is that the scroll window will show previous command line entries with output but shows only the last 50 or so of the FB display. Clearly there is some screen wrapping going on by FB.
type logger
Redim s(any) as string
declare sub openlogger
declare operator let (byval xs as string)
end type
operator logger.let(byval xs as string)
redim preserve s(ubound(s)+1)
s(ubound(s))= xs
end operator
sub logger.openlogger
locate 1
Print "**Logger**"
for i as integer = lbound(s) to ubound(s)
if csrlin mod 25 = 24 then
Print "press any key to continue"
sleep
cls
Print "**Logger**"
else
print s(i)
end if
next
end sub
'Mainprogramm here
dim as logger logg
for i as integer = 1 to 100
print "I = ";I
logg = "I= "+str(i)
next
print "done. Press a key to open the logger"
sleep
cls
logg.openlogger
Print "A key to exit."
sleep
Yes, width 10100,10100 works. I'm not sure why fxm's version doesn't, however.
I know there is a 2 sec. pause on the latter version at the beginning of the program I guess to go grab a bunch of storage. It seems extreme to have to do that for what has been up to now a typical system response (i.e. ability to scroll back more than 4 lines). I'm not sure why the system scroll spec doesn't work.
Anyway, thanks to both of you for the help. Although interesting, I won't be going the TYPE route with this since it's a bit above my pay grade and this is often for brief testing and other quickie results uses.
The result of the below program shows that the spec I have in the Windows command line parameters of 9100 is not being seen by FreeBasic. I'm not sure if this is some timing issue or something else. Also, somehow, no matter what I provide in the WIDTH command, the first 200 or so lines (plus the WIDTH displays) get truncated (i.e. I can't review them). Going in and changing it to a pre-execution window makes no difference. All pretty funky.
Lothar Schirm wrote: ↑Mar 29, 2023 10:41
Do you use the windows terminal? I use the console host instead, that works for me (windows 11).
I know this is an old post but my problem came back. The solutions that seemed to get me by above did not seem to work consistently or function correctly (or at least as I wanted them to). I tried all kinds of things, but I believe your solution may have work best. That is, to select "Legacy console" in the Properties section of the CMD line window and things are back to the way I've been familiar. I believe I'm getting what you refer to as the "console host" but not sure. I had tried this selection (i.e. Console Host as default) in another Window Properties selection (Terminal window, I think) and that didn't work. Anyway, it works now. I'm able to scroll back "forever" without the WIDTH spec (which really didn't work all that well). The font was small but I'm able to change that. Tnx.