1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Support' started by Joe Caverly, Feb 6, 2010.

  1. Joe Caverly

    Joined:
    Aug 28, 2009
    Messages:
    638
    Likes Received:
    6
    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
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,729
    Likes Received:
    80
    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
     
  3. Joe Caverly

    Joined:
    Aug 28, 2009
    Messages:
    638
    Likes Received:
    6
    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
     

Share This Page