Clearing a section of the screen works in CMD, not in TC

Hi,
I'm using

Code:
TCC  11.00.39   Windows XP [Version 5.1.2600]
TCC Build 39   Windows XP Build 2600  Service Pack 3
I have a need to clear a section of the console screen. I have written a program to do so;

Code:
#COMPILE EXE
#DIM ALL

FUNCTION PBMAIN () AS LONG
  LOCAL Direction$
  LOCAL LinesToScroll&
  LOCAL y1&, x1&, y2&, x2&
  
  Direction$ = COMMAND$(1)
  LinesToScroll& = VAL(COMMAND$(2))
  y1& = VAL(COMMAND$(3))
  x1& = VAL(COMMAND$(4))
  y2& = VAL(COMMAND$(5))
  x2& = VAL(COMMAND$(6))
  
  SELECT CASE UCASE$(Direction$)
    CASE "UP"
      SCROLL UP LinesToScroll&, y1&, x1&, y2&, x2&
    CASE "DOWN"
      SCROLL DOWN LinesToScroll&, y1&, x1&, y2&, x2&
    CASE "LEFT"
      SCROLL LEFT LinesToScroll&, y1&, x1&, y2&, x2&
    CASE "RIGHT"
      SCROLL RIGHT LinesToScroll&, y1&, x1&, y2&, x2&
    CASE ELSE
      SCROLL DOWN LinesToScroll&, y1&, x1&, y2&, x2&
  END SELECT
END FUNCTION
I have CMD.EXE running in a TC tab, and when I run my program as such;

Code:
scroll up 16 10 5 20 80
The screen is cleared in the indicated area.

When I run it in a TCC window, it does not clear the indicated area. It does nothing. I only have one copy of SCROLL.EXE that I am running from the exact same directory.

Is there a setting in TC that I have to set in order for my program to work as it does in CMD.EXE?

Joe
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
> I have a need to clear a section of the console screen. I have
> written a program to do so;

Take Command just displays the contents of the console window; it cannot be
involved here.

Does the screen clear if you run a stand-alone TCC session?

(This would be easier to do in TCC using ANSI commands.)

Rex Conn
JP Software
 
Take Command just displays the contents of the console window; it cannot be
involved here.

Does the screen clear if you run a stand-alone TCC session?

(This would be easier to do in TCC using ANSI commands.)

Rex Conn
JP Software

Hi,
I closed out TC, and then started it again. My program now works in TCC and CMD. Not sure why it did not work before, but no problems now. Weird.

Joe
 
Similar threads
Thread starter Title Forum Replies Date
CWBillow Clearing out the Windows Temp folder Support 2
L tcmd clearing clipboard Support 13
noahcoad Fixed Can't @iniread a section w quotes in the name Support 6
thedave Remove a section from an INI file Support 6
M No line wraps if last line of the screen buffer is reached Support 5
krischik Take Command opens with (almost) white screen and then hangs Support 3
O Why this screen? Support 10
M TCC screen text bright colors not as bright in 24 as 23 Support 5
vefatica Win10, alternative screen buffer, cursor doesn't blink Support 11
R Vertical scroll bar disappeared with SCREEN Support 6
T How to? Show the values of batch variables on the TCC screen Support 21
T How to? Off screen move? Support 3
G Odd problem - screen brightness Support 4
R Find in screen buffer - find next behavior Support 0
samintz How to? Screen capture with color Support 13
fishman@panix.com Can I start TCC in full screen mode? Support 9
G Linux curses (full screen) crashes TC Support 1
L w10 - half screen Support 2
I TC "Registering" but NOT Registering, Now Hung on TCMD Option Screen Support 2
Jay Sage Ctrl-C Not Working Reliably to Copy Screen Content Support 4
L Full Screen in Office 2013 theme chars missing Support 8
J Screen Capture (Console Mode) Support 5
H V15 installer difficult to use with JAWS screen reader Support 0
knudvaneeden cls in TakeCommand screen does not clear full screen Support 26
G WAD Pipe clears screen Support 2
S How to? enable or disable screen saver password Support 5
J Color command and Screen Buffer. Support 2
H VIEW not "screen reader friendly: Support 7
fishman@panix.com Is there a way to get the HELP screen to open maximized? Support 4
O Pausing screen? Support 2
J Utility to Save/Restore current screen Support 16
Roedy Screen background colours Support 1
A TakeCommand screen width Support 1
I Environment variable in OPTION screen? Support 2
G Cls Does not appear to clear screen Support 8
D TCC - Full Screen/History window conflict - workaround? Support 4

Similar threads