Date: Mon, 25 Jun 90 10:25 EDT From: "Andrew B. Sackett X 5150" Subject: RE: Escape sequences in DCL To: INFO-VAX@SRI.COM X-VMS-To: IN%"INFO-VAX@SRI.COM" >Is there a way to send escape sequences to a terminal in DCL. >My goal is to be able to have some output to the screen be in >bold type. The escape sequences will be called from within a DCL >command procedure. > >Many escape sequences are given in the back of "Installing and Using >the VT320 Video Terminal," but the manual is not specific on how >the sequences are called. > >Please provide examples if possible. > >Thanks, >Tim Hello, Tim. It's not that tough. If your terminal is compatible with the VT220, you can do all this from DCL. Andrew Sackett Chedoke McMaster Hospitals 1200 Main Street West Hamilton, Ontario Canada Voice: (416) 521-9800 Ext. 5150 Net: sackett@darwin.cmh.McMaster.CA NOTE: Unless otherwise noted, oppinions expressed anywhere in this message are mine and mine alone. $!------------------- cut here ------------------------------------------ $ $!Note that the case of the characters after the [ is important. That is, $![4a won't move the cursor, and [1;20R won't set any scroll regions) $!(from the vt220 reference book) $ $!Random Cursor Access on VT220 terminals. $ $ESC[0,8] = 27 ! define the escape character $echo :== write sys$output $ $echo "''ESC'[xA" !move up x lines, same col. $echo "''ESC'[xB" !move down x lines, same col. $echo "''ESC'[xC" !move right x columns, same line. $echo "''ESC'[xD" !move left x columns, same line. $echo "''ESC'E" !locates at first spot next line. $echo "''ESC'[x;yH" !locates at row,col (x,y). $echo "''ESC'[xJ" !erases cursor pos to end of screen. x<>0,1,2 $echo "''ESC'[x;0J" !erases cursor pos to end of screen. $echo "''ESC'[x;1J" !erases beg. of screen to and including cursor pos. $echo "''ESC'[x;2J" !erases entire screen. $echo "''ESC'[xK" !erases cursor pos to end of line. x<> 0,1,2 $echo "''ESC'[x;0K" !erases cursor pos to end of line. $echo "''ESC'[x;1K" !erases beg. of line to and including cursor pos. $echo "''ESC'[x;2K" !erases entire current line. $echo "''ESC'[xX" !erases cursor pos and next x chars. $echo "''ESC'[t;br" !sets lines from t to b as a scroll region. $echo "''ESC'[r" !turns off scroll region. $ $!Character Attributes on VT220 terminals. $ $echo "''ESC'[0m" !All attributes off $echo "''ESC'[1m" !Intensity only on $echo "''ESC'[4m" !Underscore only on $echo "''ESC'[5m" !Blinking only on $echo "''ESC'[7m" !Reverse only on $echo "''ESC'[22m" !Intensity only off $echo "''ESC'[24m" !Underscore only off $echo "''ESC'[25m" !Blinking only off $echo "''ESC'[27m" !Reverse only off $ $!To turn on several things at once, separaate them by simicolons. eg: $ $!echo "''ESC'[22;7m" $ $!turns intensity off and reverse video on at the same time, but will not $!affect other attributes. $ $!Single Height letters $echo "''ESC'#5string" !prints string in single width. $echo "''ESC'#6string" !prints string in double width. $echo "''ESC'#3topstring" !prints top half of double-height string* $echo "''ESC'#4botstring" !prints bot half of double-height string* $ ! *Top and bottom strings must be identical. $