[SunHELP] script Question

Naser Ali sunhelp at sunhelp.org
Mon May 7 12:14:53 CDT 2001


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0D719.3B8B8F10
Content-Type: text/plain;
	charset="iso-8859-1"

Thanks every one for your help. Actually I was trying to find out that using
the shell and all text based processing was there a way to to display a
message without refreshing the screen. Unfortunately there is none, unless
one decides to use some other tool such as fmli or use cursors libraries.
 
Below is my simple version, which always displays the menu for user unless
user presses x or X to exit out of the menu.
this does refreshes the screen though.
My sincere thanks and regards to you all.
 
========================================================
done=false
while [[ $done = false ]];do
done=true
read reply?'                             Your Response?--> '
 
case $reply in
[aA])   command
           command
               .
done=false;;               .
        
[xX]) exit ;;
 
*) print '\n\n\n\n\nIncorrect Selection. Please try Again.'
   read WRONG?'Press Enter key To continue'
   clear
   done=false ;;
esac
done

============================================================================
=


-----Original Message-----
From: Naser Ali [mailto:Ali.Naser at irs.gov]
Sent: Thursday, May 03, 2001 4:46 PM
To: 'sunhelp at sunhelp.org'
Subject: RE: [SunHELP] script Question



I am usingf ksh. I am using clear to clear the screen and display the error
message at bottom. It works fine , but the question is can you do this with
out refreshing the screen.

Regards 

Aali Naser 


-----Original Message----- 
From: John Kennedy [ mailto:jckennedy at agere.com <mailto:jckennedy at agere.com>
] 
Sent: Thursday, May 03, 2001 4:04 PM 
To: sunhelp at sunhelp.org 
Subject: Re: [SunHELP] script Question 


What shell is the script written in?  Are you using case to resolve your 
selections???  If you are have clear as the first command run on correct 
choices... 
John 

> Naser Ali wrote: 
> 
> Hello Everyone, 
> 
> Suppose you have a script, whic display a menu on the screen centered, and

> gives you a prompt as well just below the menu. If the wrong selection is 
> made, then I would like to display an error message at the bottom of the 
> screen without refreshing it. And it should disappear after the correct
choice 
> is made. Is there a way to accomplish this..? 
> 
> TIA 
> 
> Aali Naser 
> 
> Aali Naser 
_______________________________________________ 
SunHELP maillist  -  SunHELP at sunhelp.org 
http://www.sunhelp.org/mailman/listinfo/sunhelp
<http://www.sunhelp.org/mailman/listinfo/sunhelp>  


------_=_NextPart_001_01C0D719.3B8B8F10
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<TITLE>RE: [SunHELP] script Question</TITLE>

<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D999070317-07052001>Thanks=20
every one for your help. Actually I was trying to find out that using =
the shell=20
and all text based processing was there a way to to display a message =
without=20
refreshing the screen. Unfortunately there is none, unless one decides =
to use=20
some other tool such as fmli or use cursors =
libraries.</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D999070317-07052001></SPAN></FONT> </DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D999070317-07052001>Below=20
is my simple version, which always displays the menu for user unless =
user=20
presses x or X to exit out of the menu.</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D999070317-07052001>this=20
does refreshes the screen though.</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D999070317-07052001>My=20
sincere thanks and regards to you all.</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D999070317-07052001></SPAN></FONT> </DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D999070317-07052001>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D999070317-07052001>done=3Dfalse<BR>while [[ $done =3D false=20
]];do<BR>done=3Dtrue<BR>read=20
reply?'          &nbsp=
;           &nbsp=
;     =20
Your Response?--> '</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D999070317-07052001>case=20
$reply in<BR>[aA])   command</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D999070317-07052001>       &nb=
sp;  =20
command</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D999070317-07052001>       &nb=
sp;      =20
.</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D999070317-07052001>done=3Dfalse;;     &=
nbsp;        =20
.<BR>        </SPAN></FONT></DI=
V>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D999070317-07052001>[xX])=20
exit ;;</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D999070317-07052001>*)=20
print '\n\n\n\n\nIncorrect Selection. Please try =
Again.'<BR>   read=20
WRONG?'Press Enter key To continue'<BR></SPAN></FONT><FONT =
color=3D#0000ff=20
face=3DArial size=3D2><SPAN class=3D999070317-07052001>  =20
clear<BR>   done=3Dfalse =
;;<BR>esac<BR>done<BR></SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D999070317-07052001>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR></SPAN></FONT></FONT></DIV=
></DIV>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px">
  <DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> Naser Ali=20
  [mailto:Ali.Naser at irs.gov]<BR><B>Sent:</B> Thursday, May 03, 2001 =
4:46=20
  PM<BR><B>To:</B> 'sunhelp at sunhelp.org'<BR><B>Subject:</B> RE: =
[SunHELP] script=20
  Question<BR><BR></DIV></FONT>
  <P><FONT size=3D2>I am usingf ksh. I am using clear to clear the =
screen and=20
  display the error message at bottom. It works fine , but the question =
is can=20
  you do this with out refreshing the screen.</FONT></P>
  <P><FONT size=3D2>Regards</FONT> </P>
  <P><FONT size=3D2>Aali Naser</FONT> </P><BR>
  <P><FONT size=3D2>-----Original Message-----</FONT> <BR><FONT =
size=3D2>From: John=20
  Kennedy [<A=20
  =
href=3D"mailto:jckennedy at agere.com">mailto:jckennedy at agere.com</A>]</FON=
T>=20
  <BR><FONT size=3D2>Sent: Thursday, May 03, 2001 4:04 PM</FONT> =
<BR><FONT=20
  size=3D2>To: sunhelp at sunhelp.org</FONT> <BR><FONT size=3D2>Subject: =
Re: [SunHELP]=20
  script Question</FONT> </P><BR>
  <P><FONT size=3D2>What shell is the script written in?  Are you =
using case=20
  to resolve your</FONT> <BR><FONT size=3D2>selections???  If you =
are have=20
  clear as the first command run on correct</FONT> <BR><FONT=20
  size=3D2>choices...</FONT> <BR><FONT size=3D2>John</FONT> </P>
  <P><FONT size=3D2>> Naser Ali wrote:</FONT> <BR><FONT =
size=3D2>>=20
  </FONT><BR><FONT size=3D2>> Hello Everyone,</FONT> <BR><FONT =
size=3D2>>=20
  </FONT><BR><FONT size=3D2>> Suppose you have a script, whic =
display a menu on=20
  the screen centered, and</FONT> <BR><FONT size=3D2>> gives you a =
prompt as=20
  well just below the menu. If the wrong selection is</FONT> <BR><FONT=20
  size=3D2>> made, then I would like to display an error message at =
the bottom=20
  of the</FONT> <BR><FONT size=3D2>> screen without refreshing it. =
And it=20
  should disappear after the correct choice</FONT> <BR><FONT =
size=3D2>> is=20
  made. Is there a way to accomplish this..?</FONT> <BR><FONT =
size=3D2>>=20
  </FONT><BR><FONT size=3D2>> TIA</FONT> <BR><FONT size=3D2>> =
</FONT><BR><FONT=20
  size=3D2>> Aali Naser</FONT> <BR><FONT size=3D2>> =
</FONT><BR><FONT=20
  size=3D2>> Aali Naser</FONT> <BR><FONT=20
  size=3D2>_______________________________________________</FONT> =
<BR><FONT=20
  size=3D2>SunHELP maillist  -  SunHELP at sunhelp.org</FONT> =
<BR><FONT=20
  size=3D2><A href=3D"http://www.sunhelp.org/mailman/listinfo/sunhelp"=20
  =
target=3D_blank>http://www.sunhelp.org/mailman/listinfo/sunhelp</A></FON=
T>=20
</P></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C0D719.3B8B8F10--



More information about the SunHELP mailing list