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

cls in TakeCommand screen does not clear full screen

Discussion in 'Support' started by knudvaneeden, Feb 18, 2013.

  1. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    Hi,

    Has anybody encountered problems with doing a 'cls' and then not clearing the whole TakeCommand screen?
    E.g. the lower lines (below line 69) are not cleared.

    ===

    Steps to reproduce:

    1. Run e.g. tcmd v14 latest version (.59)
    2. Maximize that TakeCommand window (to full screen on a 30 inch monitor)
    3. Open any TAB
    4. E.g. make sure TCC opens and runs
    5. The maximum window in which TCC runs seems to be restricted to about 69 or 70 lines vertically
    (=black window)
    6. But sometimes lines below 69 lines are also written to
    (=lower blue part)
    7. Result: Then if you do a 'cls' then only the first 69 lines are cleared, and the lines below that are not cleared and stay visible.
    8. But expected was: that if you do a 'cls' then the whole full screen is cleared, not only the first 69 lines.

    ---

    The workarounds are e.g.

    1. Changing the window from maximized to a non-maximized size (e.g. by clicking on the windows [] and then decreasing the window size by using the mouse)
    or similar
    2. Manually pressing repeatedly <ENTER> so that the cursor moves to the lower part of the 69 lines. Then doing a 'cls' with the cursor in that lower position does also clear the whole screen.

    ---

    This has occurred at least from Tcmd v11, v12, v13 en v14.
    I have never seen this resolved by any version.

    ===

    Tried:

    1. I tried e.g. again in the latest version to change the window settings (e.g. Buffer Rows, custom window size (height and Y), restarted TakeCommand after that.
    2. Checked tcmd.ini in the <user>\AppData\Local\ directory for any relevant parameter
    3. It might be a driver issue has been suggested, but I am not sure about this
    4. I expect some (maybe hard coded?) window height setting somewhere. Maybe more users have encountered the same issue.

    ---

    See also screenshot where you clearly see that tcc runs in a smaller (black) window, while
    the whole (blue) screen is much bigger.
    Sometimes lines are also written in the lower blue part which can thus not be cleared using 'cls'.

    Thanks
     

    Attached Files:

  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,300
    Likes Received:
    39
    Are you saying that part of the visible area of the console window is not being cleared, or are you talking about part of the scrollback buffer which is not visible?

    CLS by itself is only supposed to clear the visible window. If you want to empty the entire buffer, that's what the /C option is for.
     
  3. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    1
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    Windows issue, not TCMD. You need to change your default console font size so that you can display more lines in the TCMD tab window.

    Windows limits the console window size to the number of lines it can display in a maximized console window, which is determined by the font size. You can change the default font size either by starting a console window and adjusting the properties, or editing the console registry settings.
     
  5. TimButterfield

    Joined:
    May 20, 2008
    Messages:
    401
    Likes Received:
    2
    I have an 80x66 TCC tab size and have experienced partial clearing where text remains in the lower lines (bottom 1/3 to 1/2 of the window) and only the upper lines are cleared. I may have mentioned it before. But, I only rarely see it and have not been able to repeat it intentionally.
     
  6. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    Yes, it is about the visible area of the console window.

    But

    CLS /C

    is something I will try next time (and e.g. creating a shorthand alias for it), as it is an easier and quicker workaround.

    The price to pay is loosing the history content of the scrollback buffer, but that buffer is usually something one does not frequently need.

    Thanks
     
  7. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    I tried

    CLS /C

    but I can confirm that it does not resolve the issue.
     
  8. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    My current font size is 9.

    Changing the font size to even smaller would make it barely visible unfortunately.

    Thanks.
     
  9. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    Actually you do not have to make the font size smaller (e.g. 5 instead of 9), but bigger (e.g. 12 instead of 9)
    (see also attachment).

    But that would give some interesting workaround for this issue.

    You could create a 'cls' alias similar to the following, which I assume would work OK (not tested or created yet, not sure if all this commands are possible out of the box)

    1. Set your Font size equal to some large value

    E.g.

    Set Font Size = 12

    2. Do a normal

    CLS

    3. Put your Font size back to your usual size

    Set Font Size = 9

    4. Put this steps in an alias

    alias yourCLS= ...
     

    Attached Files:

  10. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    No
    No, as far as I can tell at this moment, there are no commands to set the FONT SIZE
    in an alias.
     
  11. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    It can probably be reproduced on any screen size.

    E.g. in attachment a 17 inch screen and font size = 6
    you see then that the bottom lines are not reachable.

    Note:
    An easy way to change the font size is to use the mouse 'middle' button.
    That can increase or decrease the font size.
     

    Attached Files:

  12. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    Actually <CTRL> + mouse 'middle' button.
    That can increase or decrease the font size.
     
  13. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,300
    Likes Received:
    39
    This is in a Take Command tab window, not a standalone console? I think I missed that point.

    If CLS isn't clearing the whole visible area of a tab window, I would tend to suspect the video driver. (I had similar issues once, long ago, when I was using an antique video card. The problem disappeared when I upgraded to a better one.)

    You might try updating the drivers for the video card. If that doesn't help, you might try playing with the "hardware acceleration" slider on the "Troubleshoot" tab of the display driver's properties dialog; but if that helps, the cure may be worse than the disease. Reducing hardware acceleration can make screen writes painfully slow in all programs.
     
  14. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    I have seen the issue occurring now on at least 3 different monitors (of different brands), so it is not likely that a driver upgrade will resolve the issue.

    As also other users reported the same behavior.

    (I think if could set the font size via an alias then that would be a possible good workaround, but setting the font size using a JPSoft command seems not possible, as far as I know now).

    Thanks,
     
  15. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,300
    Likes Received:
    39
    I mean specifically the video card, not the monitor.

    If you want to change console fonts from within TCC, you might try Vincent's 4CONSOLE plugin: ftp://lucky.syr.edu/4plugins/
     
  16. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    I tried it, but I got this error:

    1. Downloaded and unzipped 4console.zip from
    ftp://lucky.syr.edu/4plugins/

    2. That gave 2 files

    4console.txt
    4console.dll

    3. I typed the commands suggested in the 4console.txt file

    plugin /U *
    set 4console_load=_qe,@icons,seticon
    plugin /L [path\to\]4console.dll
    4. But I got, even after redownloading and unzipping and giving the full filename to the DLL the error:

    plugin /L 4console.dll

    TCC: (Sys) 4console.dll is not a valid Win32 application.

    5. I think there is something wrong with the DLL.
    This is run on Microsoft Windows Ultimate 64 bits
    JPSoft TakeCommand / tcc v4.03.59

    Thanks
     
  17. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    I think I found it, there is also an 'x64' subdirectory.
    There you can download

    ftp://lucky.syr.edu/4plugins/X64/4console64.zip

    I will try that now.
     
  18. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    Yes, that works using e.g.

    plugin /U *

    plugin /L 4console64.dll
     
  19. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    I do currently not think it works (that is it will not successfully change the font size, as it probably will change nothing):

    1. I typed the command to load the DLL

    plugin /L 4console64.dll

    2. Then I checked which functions were loaded

    plugin /F
    4CONSOLE: @BOOL @BUFCHAR @FONTH @FONTW @ICONS

    3. Then I tried to change the width of the font

    echo %@FONTW[9]

    That returned:
    10

    But nothing changed regarding the font width.

    4. Then I tried to change the height of the font (e.g. choosing 20, 10, 15, 13, ...)

    echo %@FONTH[20]
    0

    %@FONTH[10]
    0

    echo %@FONTH[15]
    0

    echo %@FONTH[13]
    0

    But nothing changed thus regarding the font height.
     
  20. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    In general I am not sure if that changing the font size from the command line will work by design in JPSoft tcmd.exe tcc window.

    Because there is also a JPSoft native FONT command.

    According to the JPSoft help:
    "Usage: This command is only available in Windows Vista and later, and will only affect stand-alone TCC console windows. (You can change the font in Take Command tab windows using Configure Take Command / Tabs.)"

    So trying first in the TakeCommand TAB tcc window to be sure:

    FONT /Y20

    or similar

    FONT /F"Terminal" /Y20

    nothing changed regarding the font.

    Even when starting a standalone tcc.exe, using 'start tcc.exe', and then typing the commands

    FONT /Y30

    and or to include the font name (which should be present)

    FONT /F"Raster Fonts" /Y30

    did not change the font at all.

    Thanks
     
  21. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,935
    Likes Received:
    30
    The command in 4CONSOLE that you need is SETFONT.
    Code:
    v:\> which setfont
    setfont is a plugin command (4CONSOLE)
    v:\> help setfont
    Syntax: SETFONT N
    N = 0 to _NFONTS - 1
     
  22. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    Does it work for you when

    1. Running tcmd.exe

    2. Then running tcc.exe in a tab

    3. Then typing the command

    plugin /L 4console64.dll

    4. Then typing the commands

    >which setfont
    setfont is a plugin command (4CONSOLE)

    >SETFONT 15
    SETFONT: Invalid font index: 15

    >echo %_NFONTS
    10

    > SETFONT 1

    > SETFONT 2

    > SETFONT 3

    > SETFONT 4

    > SETFONT 5

    > SETFONT 6

    > SETFONT 7

    > SETFONT 8

    > SETFONT 9

    > SETFONT 10
    SETFONT: Invalid font index: 10

    But it does not change the font thus in that TAB window (result: Nothing changes, still the same font).

    Tested on Microsoft Windows 7 Ultimate 64 bits English version
    JPSoft TakeCommand 14.03.59

    Thanks
     
  23. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,935
    Likes Received:
    30
    I wouldn't expect it to work in TCMD. It sets the console font. Use TCMD's Options dialog to change the font in tabs. Use SETFONT to change the font in a stand-alone console.
     
  24. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,935
    Likes Received:
    30
    P.S. I suspect many things in 4CONSOLE either won't work in a tab or won't make any sense. It's meant for console windows.
     
  25. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    No, I'm talking about changing the font size of the (invisible) console window, not of the Take Command window.
     
  26. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,935
    Likes Received:
    30
    Rex, what parameters do I give FONT to get the 8x12 raster font (in a console)? I tried and couldn't get it.
     
  27. knudvaneeden

    Joined:
    Dec 19, 2010
    Messages:
    18
    Likes Received:
    0
    FYI

    Here you see the issue on a 15 inch screen (see PDF attachment).

    After a 'cls' the upper part is cleared,
    but at the bottom are thus lines remaining which are not cleared.
     

    Attached Files:

    • 01.pdf
      File size:
      84.9 KB
      Views:
      5

Share This Page