[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

317.0. "What's the cursor position from DCL ?" by SHEILA::BRODRIBB () Tue Sep 23 1986 08:55

        I'm sure this is very simple to anyone other than me, or so
        it would seem. Despite massaging READ with /TIMEOUT and
        /PROMPT=escape_sequence I've been unable to come up with
        a command procedure to determine the current cursor position.
        From a program it's easy I know, however I have a customer
        who'd like to do it in LOGIN.COM .
        
        Has anyone had any experience doing this before ? BTW did
        not put this in VMSnotes, somehow hack_file seemed far more
        appropriate.
        
        Thanks in advance,
        
        		John
T.RTitleUserPersonal
Name
DateLines
317.1Something like this perhaps?BISTRO::HEINHein van den Heuvel, Valbonne.Tue Sep 23 1986 10:368
$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
317.2SHEILA::BRODRIBBThu Sep 25 1986 06:295
        Thanks Hein,
        
        That fixed things up a treat !!
        
        	John