T.R | Title | User | Personal Name | Date | Lines |
---|
507.1 | perhaps you can do it differently (cursor position) | VIDEO::OSMAN | type video::user$7:[osman]eric.six | Thu Jun 25 1987 15:42 | 10 |
| There isn't a lexical. However, this sounds like one of those "what are
you really trying to do" situations.
That is, perhaps there's a way to do just what you really want to do *without*
reading the cursor position.
By the way, if you merely want to know the position so you can restore it
later, you can use escape sequences to save and then restore the position.
/Eric
|
507.2 | DCL sample to interrogate cursor position. | CASEE::VANDENHEUVEL | Formerly known as BISTRO::HEIN | Mon Jun 29 1987 04:17 | 9 |
|
$ESC[0,8]=27 !Handy
$SET TERM/NOESC/NOLINE/NOECHO !Set up terminal
$WRITE SYS$OUTPUT ESC+"[6n"+ESC+"[6n" !Ask for corsur report twice
$READ/PROMPT="" SYS$OUTPUT X !Empty_line_terminated_by_escape
$SET TERM/ESC !Entire escape sequence = terminator
$READ/PROMPT="" SYS$OUTPUT X !The_cursor_position_report
$SET TERM/NOESC/LINE/ECHO !Reset terminal
$WRITE SYS$OUTPUT X !The_cursor_position_report
|
507.3 | RE -1 | KLOV01::FLANAGAN | from darkest clonmel... | Wed Jul 15 1987 06:35 | 14 |
|
Your routine always returns the location as [XX+1;1
ie always with a line offset of one (no problem ) and
the column index as one (a problem !)
I'am hacking up a little routine which involves a hib process
and I want to save the cursor pos ,write to the screen without a
return, and restore the cursor position. ( not really a hack I know
but...)
So any help etc.
Neil f
|
507.4 | | UFP::MURPHY | European or African Swallow? | Wed Jul 15 1987 08:58 | 14 |
| The problem is that the WRITE SYS$OUTPUT that sends the request
sequence is followed by a RETURN. If you merge the WRITE and first
READ into a single READ/PROMPT, this won't happen.
Following is a modified copy of .2:
$ESC[0,8]=27 !Handy
$SET TERM/NOESC/NOLINE/NOECHO !Set up terminal
$! Request the report twice. The leading ESCape of the first report
$! will terminate this read.
$READ/PROMPT="''ESC'[6n''ESC'[6n" SYS$COMMAND X
$SET TERM/ESC !Entire escape sequence = terminator
$READ/PROMPT="" SYS$OUTPUT X !The_cursor_position_report
$SET TERM/NOESC/LINE/ECHO !Reset terminal
$WRITE SYS$OUTPUT X !The_cursor_position_report
|
507.5 | <<>> | KLOV01::FLANAGAN | from darkest clonmel... | Mon Jul 20 1987 04:53 | 9 |
|
Good idea about read/prompt, but how about writing to the screen
to reposition the cursor without doing a return after storing
cursor position and writing to the screen from a hiber process ?
Someone here said to look at QIO and specify a longword mask to
kill CR/LF. Any ideas anyone ?
NPf
|
507.6 | READ/PROMPT will do it | TONTO::SCHRADER | | Mon Jul 20 1987 08:42 | 9 |
| RE: .-1
The following seems to work ...
$ READ/PROMPT="Escape sequence"/TIME_OUT=0/ERROR=ERRL SYS$COMMAND DUMMY
$ERRL:
TIME_OUT=0 forces immediate termination of the read.
ERROR=ERRL gets rid of a timeout status message.
|
507.7 | Yes,but... | KLOV01::FLANAGAN | from darkest clonmel... | Mon Jul 20 1987 13:45 | 16 |
|
OK, used -1 so now can save cursor pos,write to the screen
and relocate cursor where it was ,but it still doesn't fix
the prob of the unwanted return at the end of the program.
I can't seem to write a program in DCL,Basic or Pascal which
doesn't force a return at the end of the code...
Now there must(?) be a simple way to do this in DCL ,but how ?
Any Ideas ?
NPf
|
507.8 | | BEING::POSTPISCHIL | Always mount a scratch monkey. | Mon Jul 20 1987 17:25 | 17 |
| Re .7:
The following is a QIOW call that does not emit characters other than
those in the string you give it. It is written in C; see the VMS
system services manual, the I/O drivers manual, and the manual for the
language you wish to use for other invocations. The IO$M_NOFORMAT is
the key to preventing anything other than your string from being
written. The vertical bar, |, is a logical OR. If this does not work
for you, then I would suspect VMS is printing a carriage-return/
line-feed after the program completes. I do not know if there is
anything you can do about that.
SYS$QIOW(0, channel, IO$_WRITEVBLK|IO$M_NOFORMAT, iosb, 0, 0,
string, length, 0, 0, 0, 0));
-- edp
|
507.9 | Possibly worth a try? | SNOMAS::LASTOVICA | Stuck in a Lather-Rinse-Repeat loop | Mon Jul 20 1987 20:35 | 7 |
| Some terminals (like VT52's and VT100's) can be tricked into swallowing
characters by seeing a bogus escape sequence. Send the beginning
part of an escape sequence and then let the program exit. Sometimes
the CR/LF will get sent but the terminal will think they are part
of an (illegal) escape sequence. I think that the ANSI sequences
can all handle cr/lf in the sequences though. Look in the VT200
owners manual and see if this 'll work.
|