Vertical scroll bar disappeared with SCREEN

Oct 18, 2009
214
8
#1
I have a program I've been using for years that writes various data using SCREEN, basically record number, name, account number dollar amount, then the next record on a new line.

Two days ago the window's vertical scroll bar disappeared and I can't scroll back with the mouse either. I didn't change of that code. Any ideas what might be causing it? I assume it has something to do with a scroll buffer. The program is started by double-clicking in Windows and just before ending it deliberately waits for the user to type DONE. Historically, I've been able to scroll even though it was waiting.

It's running under TCC 22 and Windows 7 Pro.

(The program is 100 pages of code, so obviously I can't list it here. And, yes, I do realize TCC isn't intended for application development, but using it isn't my choice.)
 
Oct 18, 2009
214
8
#4
The program runs by double-clicking in Windows Explorer and not from either a tab or a command line.

The scroll bar used to appear immediately, while the records were being processed and written to the screen.

"DONE" is at the very end of the program, so it's not a factor. After the stuff is written to the screen various files are deleted, a file containing each account record is backed up, etc., and then it goes to an INPUT statement and waits for the user. That just keeps the program from closing on its own (so the user can scroll back through the screen if necessary ....)

A line is read from a text file and parsed into variables (no array), then some variables are massaged, a record is created as a variable and written to a file (using echo whatever>>%outfile), then some of the parsed/massaged variables are written to the screen, and it loops back for the next record.

The screen-writing code is as follows. USE_COLOR_ are aliases. USE_COLOR_ERROR simply means "bright red on bright white"--it has nothing to do with whether there is an error.

:: Write record summary to screen
Echos %Count_Total_Records
Screen +0 5 %Surname, %First_Name
USE_COLOR_MAIN

::Hilite hi $ color bright red on bright white
IF %TOTAL_CHARGES GE %Hi_Dollar USE_COLOR_ERROR
Screen +0 34 $%TOTAL_CHARGES
:: color blue on bright white
USE_COLOR_MAIN

:: If NAME > cutoff_len chars, color HOSPITAL name. This is a flag
:: for POTENTIAL name cutoff.
IF %@len[%Surname, %First_Name] GT %cutoff_len USE_COLOR_WHITE_TEXT

Screen +0 48 %Hosp_Abbrv
USE_COLOR_MAIN

IF %Is_Junk NE Yes Screen +0 67 %MLO_Acct_No
Echo.


I'm assuming the problem has something to do with the scroll buffer. I did have a line CLS/S, which I deleted in the process of trying to resolve this.
 
#5
I gather that when you start it from Explorer, TCC (not TCMD) starts. ... right?

Is the program a BTM ... a BAT? Find out how it's run like this.
Code:
v:\> assoc .btm
.btm=TCC.Batch

v:\> ftype tcc.batch
tcc.batch="G:\tc16\tcc.exe" /c "%1" %*
Then, from Explorer, run the program that runs your script (in my example, that would be G:\tc16\tcc.exe). Does it have scroll bars? Look at its properties, in particular, "Layout".
 
Oct 18, 2009
214
8
#7
Thanks! That solved it. Somehow it got changed to 25. I did open another window and that showed 335, but I'm running the actual program right now and that window was 25. I changed it to 1000 and the scroll bar is back.