1828571 Members
2708 Online
109982 Solutions
New Discussion

Re: Screen lin,pos

 
jpaulino05
Occasional Contributor

Screen lin,pos

Question: How can I display a line of text in a desire location on the screen from DCL command line.
I meant, using command procedure and I want to display text on the screen but on the exact line and position of the screen.

All of you have helped me a lot in every question that I had posted.
Thnks guys.
3 REPLIES 3
Jan van den Ende
Honored Contributor

Re: Screen lin,pos

jpaulino05

Set up a symbol ESC with numeric value 27:
$ ESC[0,8]=27

$ line =
$ col =

The display the escape sequence + desired text:

$ write sys$output "''esc'[''line';''col'H"

Better copy the line above into a fixed-font sscreen for viewing the difference between ' and "

I will repeat with a fixed position example and explain that.
line = 3 col = 40 (middle of screen, third line from top)
$ write sys$output "''esc'[3;40H"

- total string between " "
- two ' ' esc ' (WITHOUT spaces) fill with value of esc
- [ begin of positioning sequence
- 3 line
- ; (semicolon) separatopr between line and col
- 40 column
- H (uppercase H) end of positioning sequence
-
After the cursor moves to col 1 of the next line.

hth

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
jpaulino05
Occasional Contributor

Re: Screen lin,pos

Thank you body. That works
Jiri_5
Frequent Advisor

Re: Screen lin,pos

you can change color of font and background.