LISTC

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
Code:
:: LISTC.BTM
::
:: Written using;
::   TCC  11.00.52   Windows XP [Version 5.1.2600]
::   TCC Build 52   Windows XP Build 2600  Service Pack 3
::
:: Since the /C of LIST only works in stand-alone TCC windows,
::   not in Take Command tab windows,
::   this script saves the screen, LISTs whatever, then restores the previous screen.
::
:: Based on alias from [URL]http://jpsoft.com/forums/showthread.php?p=8157[/URL]
::
::
@echo off
setlocal
iff %_tctabs ne 0 then
  :: TCC is running in Take Command
  ::
  :: Save the current buffer handle
  set bookmark=%@consoleb[-1]
  ::
  :: Create a new console screen buffer
  echo %@consoleb[0] > nul
  set ncsb=%_consoleb
  ::
  :: List the file
  *list %$
  ::
  :: Switch back to saved screen buffer
  echo %@consoleb[%bookmark] > nul
  ::
  :: Close the screen buffer used for list
  echo %@fileclose[%ncsb] > nul
else
  ::
  :: TCC is not running in Take Command
  *list /c %$
endiff
endlocal