Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Customizing prompts...

31 views
Skip to first unread message

Steve Sybesma

unread,
Jun 9, 1995, 3:00:00 AM6/9/95
to
Hello,

I created this very simple function key menu based on three elements:

1) a file called F#.ANS which contains KKRs for all 48 function keys;
2) 48 batch files, each of which correspond to one of the reassigned keys;
3) a file called F# which is a simple text file in the form of a table that is
exactly 2000 characters in length (containing no CRs or LFs). The reason
for this is that, by coincidence, the table consists of 12 rows by 4
columns (representing the 4 shifted states--normal, shift, control, alt)
SEPARATED by lines, which when all is added up comes to 25 lines.

Now, herein lies the problem: Because by choice I want to use the full
screen for the menu, and have the actual text file F# act as the prompt
by itself, what I expect to happen is that the file F# should print to the
screen, filling it completely, then have the cursor move to the top left
corner of the screen. The part about moving the cursor I know how to do,
BUT I cannot figure out how to keep the display from scrolling up a line
as it does automatically after printing the 80th character on the 25th line.

I have come so close to accomplishing what I'm trying to do by cutting short
the text by one character thereby preventing the display from scrolling, but
would like to know, basically, if there is any way to print a character at
the last screen position (row 25, column 80) and either have the cursor
remain at that point or have it move to the upper left corner WITHOUT the
display scrolling up a line. This is the essence of the problem, the
solving of which would make the menu I'm creating complete. Keep in mind
that I am aware this is easily done by creating a C program, but I want to
do this purely as a DOS project to prove to myself that it can be done.

It's just that I haven't discovered the right escape sequences or the right
order to put them in to achieve what I'm trying to do. It seems possible.
Anyone who is an expert on ANSI.SYS and/or batch files would be a likely
person to be able to answer this question.

Thanks for your time,
--
----------------------------------------------------------------------------
****Steve Sybesma Post Office Box 5574, Walnut Creek, CA 94596-1574 USA****
****************Phone 1-510-947-6029****************
----------------------------------------------------------------------------

Kirshner

unread,
Jun 9, 1995, 3:00:00 AM6/9/95
to
Steve Sybesma (syb...@ccnet.com) wrote:
> Hello,

> I created this very simple function key menu based on three elements:

> 1) a file called F#.ANS which contains KKRs for all 48 function keys;
> 2) 48 batch files, each of which correspond to one of the reassigned keys;
> 3) a file called F# which is a simple text file in the form of a table that is
> exactly 2000 characters in length (containing no CRs or LFs). The reason
> for this is that, by coincidence, the table consists of 12 rows by 4
> columns (representing the 4 shifted states--normal, shift, control, alt)
> SEPARATED by lines, which when all is added up comes to 25 lines.
>
> Now, herein lies the problem: Because by choice I want to use the full
> screen for the menu, and have the actual text file F# act as the prompt
> by itself, what I expect to happen is that the file F# should print to the
> screen, filling it completely, then have the cursor move to the top left
> corner of the screen. The part about moving the cursor I know how to do,
> BUT I cannot figure out how to keep the display from scrolling up a line
> as it does automatically after printing the 80th character on the 25th line.

> ...

> Keep in mind
> that I am aware this is easily done by creating a C program, but I want to
> do this purely as a DOS project to prove to myself that it can be done.

> It's just that I haven't discovered the right escape sequences or the right
> order to put them in to achieve what I'm trying to do. It seems possible.
> Anyone who is an expert on ANSI.SYS and/or batch files would be a likely
> person to be able to answer this question.

I believe you need to turn off the screen wrap using <ESC>[=7l before
printing the 25th line and turn it back on with <ESC>[=7h after moving the
cursor to a safe place (0,0 maybe).

BTW that is a lowercase L in the first escape sequence.

Hope you get it working.

Tom Lavedas
-----------
Kershner, Wright & Hagaman, P.C.
Consulting Electronics Engineers

0 new messages