home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / msdos / misc / 6718 < prev    next >
Encoding:
Text File  |  1992-12-26  |  2.3 KB  |  67 lines

  1. Newsgroups: comp.os.msdos.misc
  2. Path: sparky!uunet!mnemosyne.cs.du.edu!nyx!istuart
  3. From: istuart@nyx.cs.du.edu (Ian Stuart)
  4. Subject: Re: ANSI ESC sequence, how??
  5. Message-ID: <1992Dec26.184442.510@mnemosyne.cs.du.edu>
  6. X-Disclaimer: Nyx is a public access Unix system run by the University
  7.     of Denver for the Denver community.  The University has neither
  8.     control over nor responsibility for the opinions of users.
  9. Sender: usenet@mnemosyne.cs.du.edu (netnews admin account)
  10. Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept.
  11. References: <1992Dec23.195236.28511@netcom.com> <1hc5qoINNjl2@sauna.cs.hut.fi>
  12. Distribution: inet
  13. Date: Sat, 26 Dec 92 18:44:42 GMT
  14. Lines: 51
  15.  
  16. People have been asking about programming ANSI escape sequences..
  17.  
  18. Well, I've got a copy of the (Free with PC Magazine) 212 Power DOS Tips! :-)
  19.  
  20. Page 61 says exactly what everyone else is saying: No Can Do From DOS.
  21. If you are in an editor (but not all editors - Edit or Wordstar had been
  22. tested, and I would guess any ASCII editor would do) "ESC" is entered as
  23. "CTRL-P ESC", and displayed as "^[". Therefor "ESC[2J" (Clear Screen) is
  24. entered as "CTRL-P[2J", and displayed as "^[[2J".
  25.  
  26. They give a solution to this (Page 62):
  27.  
  28.     Often, a small utility program is convinient when creating
  29.     ANSI sequences in batch jobs. ANSAY is just such a program
  30.     and can be created as follows:
  31.  
  32.     COPY con temp.hex
  33.     :100100008A0E800081E17F007416497413BB82005F
  34.     :100110008A174380FA247502B21BB406CD21E2F09F
  35.     :10012000B8004CCD210000000000000000000000DD
  36.     :00000001FF
  37.     <F6>
  38.     Debug temp.hex
  39.     r cx
  40.     25
  41.     n ANSAY.COM
  42.     w
  43.     q
  44.  
  45.     The part up to <F6> (designating that the F6 key be pressed)
  46.     creates a hexidecimal file, and the debug part turns this
  47.     HEX file into ANSAY.COM
  48.     Ansay.com is a program which behaves exactly like the Echo,
  49.     but turns every occurance of the '$' character into an
  50.     escape. Batch jobs containibg Ansay commands can be written
  51.     with any editor, and can be printed.
  52.  
  53. This means that the example above (Clear Screen) is:
  54.  
  55.     ansay $[2J
  56.  
  57. They also give ways of using EDLIN and DEBUG to write short scripts that
  58. can be 'TYPE'd to feed ansi commands to the console, but I don't think
  59. that that is what you are after.
  60.  
  61. Hope this helps one and all - And may '93 be a colourfull year (and please
  62. don't Drink And Drive!)
  63.  
  64. --
  65. --- Kiz (aka Ian Stuart) istuart@nyx.cs.du.edu
  66.     { Chivalry is not dead! - Just the Horse }
  67.