jrv@siemens.UUCP (04/29/87)
I would like to have the terminal bell rung from within a DCL command file. Is there a way to specify control characters within a string used with a 'write sys$output' statement? Can the control character be entered "raw" into the string or is there a character escape mechanism? I tried everything I could think of and didn't see anything in the orange wall of manuals. Right now I 'type' a file which has a single bell character in it. Thanks. Jim Vallino Siemens Research and Technology Lab. Princeton, NJ CSNET: jrv@siemens.siemens-rtl.com UUCP: {ihnp4,seismo,philabs}!princeton!siemens!jrv
tedcrane@batcomputer.UUCP (04/30/87)
In article <154@siemens.UUCP> jrv@siemens.UUCP (James R Vallino) writes: >I would like to have the terminal bell rung from within a DCL command >file. There are two ways to go about this, and which is cleaner is up to you: $ BELL = "^G" !Enter the <BEL> (^G) character using SPECINS !in EDT (<GOLD>7<GOLD><KP3>) or similar method !in any other editor. This does cause you grief !when you type the command file, but it's easy. $ BELL = " " !This defines BELL as a character symbol. $ BELL[0,8] = 7 !This replaces the first eight bits of the symbol !with the value seven. Now BELL contains an ASCII bell. The same techniques can be used to create local (or global) symbols containing the <ESC> or <CSI> characters, and those can be used to build ANSI escape sequences. -ted tedcrane@squid.tn.cornell.edu
garvey@blic.UUCP (04/30/87)
In article <154@siemens.UUCP>, jrv@siemens.UUCP (James R Vallino) writes: > I would like to have the terminal bell rung from within a DCL command > file. Is there a way to specify control characters within a string > used with a 'write sys$output' statement? Can the control character be > entered "raw" into the string or is there a character escape mechanism? This is an example of how that could be done: $ esc_chr[0,8] == %O033 $ clear == "WRITE SYS$OUTPUT esc_chr,""[H"",esc_chr,""[2J""" It was done in this way so that showing the symbol `clear' would not clear the terminal screen and would display the actual escape sequence. -- Robert Garvey uucp: ...!ucbvax!mtxinu!blia!blic!garvey arpa: mtxinu!blia!blic!garvey@Berkeley.EDU Anything resembling an opinion may be attributed to me alone.
kuo@skatter.UUCP (Dr. Peter Kuo) (05/10/87)
In article <154@siemens.UUCP>, jrv@siemens.UUCP writes: > I would like to have the terminal bell rung from within a DCL command > file. Is there a way to specify control characters within a string > used with a 'write sys$output' statement? Can the control character be > entered "raw" into the string or is there a character escape mechanism? Have you tried putting in the ^G using EDT (using the special character insert mode) when building your DCL command file (8-) ? It works fine. ------------------------------------------------------------------------------- Peter Kuo | Bitnet (VMS) : KUO@SASK Accelerator Laboratory | (a.k.a. The Beam Warehouse) | uucp (Unix) : !alberta\ Univ. of Saskatchewan | !ihnp4 -- !sask!skatter!kuo Saskatoon, Saskatchewan | !utcsri / CANADA S7N 0W0 | (Earth) | Ma Bell : (306) 966-6059 Disclaimer: I don't know what I am saying, so don't quote me on anything! And I only speak for myself. Also, I am now stuck on a ^%^^%)^&* Unix machine.
dhesi@bsu-cs.UUCP (Rahul Dhesi) (05/10/87)
In article <312@skatter.UUCP> kuo@skatter.UUCP (Dr. Peter Kuo) writes: >In article <154@siemens.UUCP>, jrv@siemens.UUCP writes: >> ...Is there a way to specify [a control G] within a string >> used with a 'write sys$output' statement? >Have you tried putting in the ^G using EDT...? That's the easy part. The DIFFICULT part is convincing VAX/VMS not to send a trailing carriage return/linefeed when doing a 'write sys$output". This is the kind of operating system bug that is not fatal, yet one that can grate on one's nerves. -- Rahul Dhesi ARPA: bsu-cs!dhesi@iuvax.cs.indiana.edu UUCP: {ihnp4,seismo}!{iuvax,pur-ee}!bsu-cs!dhesi
corwin@bsu-cs.UUCP (Paul Frommeyer) (05/11/87)
You must use either the SPECINS key in VAX EDT or the QUOTE function in VAX TPU to enter the control characters. Just put them between double quotes in a WRITE SYS$OUTPUT DCL command as you would normal text. I use terminal control sequences extensively in my LOGIN.COM; clearing the screen, setting VT240 colors, etc. However, you cannot do this: $ CLEAR :== WRITE SYS$OUTPUT "<ESC>[H<ESC>[J" and then say $ CLEAR because you will get an error message (either UNDEFSYM or IVVERB). You must instead: $ CSYM :== "<ESC>[H<ESC>[J" $ CLEAR :== WRITE SYS$OUTPUT CSYM which will do the job. This is also more efficient than something like: $ CLEAR :== @CLEARSCREEN -- Paul "Corwin" Frommeyer "Experience is no substitute for competence." UUCP: {seismo,ihnp4}!{iuvax,pur-ee}!bsu-cs!corwin