home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / doshelp / helpsb.zoo / help / esc / examples.hlp next >
Encoding:
Text File  |  1989-01-01  |  1.0 KB  |  31 lines

  1. SAMPLE command | Comments about the output
  2.  
  3.   ESC [2J     This escape string will clear the screen if ANSI.SYS is
  4.          installed. See the CONFIG.SYS DEVICE topic.
  5.  
  6.   ESC E > PRN     This escape string will be sent to the printer. Notice 
  7.          the use of redirection (>) to accomplish this.
  8.  
  9.   BAT file that can be used if the ESC command is not present on your DOS:
  10. @ECHO OFF
  11. REM Usage: ESC character-string [device-name]
  12. REM ^[ below should be an ASCII ESC character (27).
  13. REM Redirection cannot be used to redirect the output of batch files, 
  14. REM so a second (optional) device-name is allowed.
  15. IF zip%2==zip GOTO nodevice
  16. FOR %%$ IN (0l 1l 2l 3l 4l 5l 6l 7l 0h 1h 2h 3h 4h 5h 6h 7h) DO IF %2==%%$ GOTO ISEQUAL
  17. FOR %%a IN (PRN prn PRN: prn: LPT1 lpt1 LPT1: lpt1:) DO IF %2==%%a GOTO prn
  18. GOTO nodevice
  19. :prn
  20. ECHO ^[%1 > %2
  21. GOTO xxit
  22. :isequal
  23. REM DOS treated "=" as a separator, but we know better
  24. ECHO ^[%1=%2
  25. GOTO xxit
  26. :nodevice
  27. IF zip%1==zip GOTO xxit
  28. ECHO ^[%1
  29. :xxit
  30. EXIT
  31.