Path: utzoo!mnetor!uunet!husc6!linus!mbunix!jcmorris From: jcmorris@mitre-bedford.ARPA (Joseph C. Morris) Newsgroups: comp.sys.ibm.pc Subject: Re: Bat file using ESC seq needs to find if DEVICE=ANSI.SYS was set Message-ID: <28501@linus.UUCP> Date: 7 Apr 88 14:22:51 GMT References: <767@ms3.UUCP> Sender: news@linus.UUCP Reply-To: jcmorris@mbunix (Morris) Organization: The MITRE Corporation, McLean, VA. Lines: 20 Keywords: ansi.sys, Escape Sequences, errorlevel, find, grep, DOS, unix In article <767@ms3.UUCP> msicv01@ms3.UUCP (Jay G. Heiser) writes: > ...I need a way to test before using any ESC seq- >uences whether or not the [ANSI.SYS] driver has been set. How can I do that? Try this from a program: Flush any waiting keyboard input characters. Write to screen: [6n (Request cursor position report) Test to see if any characters are waiting in the keyboard buffer If not, then ANSI.SYS (or an equivalent driver) is NOT present. Eat any waiting characters. Good luck.