console colors and line input ...

Discussion in 'Perl Misc' started by Tonino Greco, Apr 4, 2005.

  1. Tonino  Greco

    Tonino Greco Guest

    Hi,

    I am needing todo a screen in unix console that looks something like :

    #!/usr/bin/perl

    use Term::ANSIColor;
    use POSIX qw(strftime);
    sub now { strftime "%Y/%m/%d %T ", localtime; }


    print color("clear");
    print color("white on_black"), " ";
    print color("white on_blue"), " Menu";
    print color("white on_black"), " ";
    print color("white on_blue"), &now , "\n", color("reset");

    print color("white on_blue"), " ", "Menu
    Selection"," \n", color("reset");

    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), " ", color("blue on_white"),
    "Username: ", color("white on_black"), " ", color("white on_whit
    e"), " \n", color("reset");

    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("white on_white"), "
    \n", color("reset");
    print color("yellow on_blue"), "Please enter your Password ...
    \n", color("reset");
    print color("yellow on_blue"), "Data directory is :
    \n", color("reset");



    and I want to be able to keep the cursor at the Username section
    forinput from the user ... but still draw the complete page.

    Can anyone shed a light on how I can do this ...


    IN essence I want to be able to (in a unix console) present a colored
    login screen then accept the username - present a password screen - the
    same as the username one - and then do some validation and present a
    menu to the user ...

    Thanks
    Tonino
     
    Tonino Greco, Apr 4, 2005
    #1
    1. Advertising

  2. "Tonino Greco" <> wrote in
    news::

    > IN essence I want to be able to (in a unix console) present a colored
    > login screen then accept the username - present a password screen - the
    > same as the username one - and then do some validation and present a
    > menu to the user ...


    I don't know much about this but you might want to look into Curses.

    http://search.cpan.org/~marcus/Curses-UI-0.95/

    http://search.cpan.org/~giraffed/Curses-1.12/

    Sinan

    --
    A. Sinan Unur <>
    (reverse each component and remove .invalid for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, Apr 4, 2005
    #2
    1. Advertising

  3. Tonino  Greco

    Tonino Guest

    thanks for this - is there a tutorial you know of I can look at ?

    Tonino
     
    Tonino, Apr 4, 2005
    #3
  4. "Tonino" <> wrote in news:1112619817.839283.221350
    @l41g2000cwc.googlegroups.com:

    > thanks for this - is there a tutorial you know of I can look at ?


    Please quote an appropriate amount of context.

    "A. Sinan Unur" <> wrote in
    news:Xns962E57AE9A049asu1cornelledu@127.0.0.1:

    > I don't know much about this but you might want to look into Curses.
    >
    > http://search.cpan.org/~marcus/Curses-UI-0.95/
    >
    > http://search.cpan.org/~giraffed/Curses-1.12/


    Did you look at the documentation?

    Did you try to search for the words 'Curses' and 'Perl' using Google
    (that is where you are posting from after all).

    As I said, I do not know much about Curses.

    On the other hand, if you attempt something, and it does not do what you
    want, I am sure someone here would be able to help you.

    By the way, please do read the posting guidelines for this group. They
    contain valuable information on how you can help others help you.

    Sinan
    --
    A. Sinan Unur <>
    (reverse each component and remove .invalid for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, Apr 4, 2005
    #4
  5. Tonino <> wrote:

    > thanks for this



    What this is that?

    Please quote some context in followups.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Apr 4, 2005
    #5
  6. Tonino  Greco

    Tonino Guest

    and where are these guidlines ?

    Tonino
     
    Tonino, Apr 4, 2005
    #6
  7. "Tonino" <> wrote in news:1112620920.196688.62810
    @l41g2000cwc.googlegroups.com:

    > and where are these guidlines ?


    1. They are posted here regularly.

    2. You are posting from Google, have you tried entering

    comp.lang.perl.misc posting guidelines

    in that search box.

    3. And, for people like you, there is a link to the HTML version in the
    signature portion in all my replies to you.

    *Sigh*

    Sinan.

    --
    A. Sinan Unur <>
    (reverse each component and remove .invalid for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, Apr 4, 2005
    #7
  8. Tonino  Greco

    Tonino Guest

    *sigh* indeed - I was going to post a nasty reply but read the
    guidelines :

    "
    Count to ten before composing a followup when you are upset
    This is recommended in all Usenet newsgroups. Here in clpmisc, most
    flaming sub-threads are not about any feature of Perl at all! They are
    most often for what was seen as a breach of netiquette. If you have
    lurked for a bit, then you will know what is expected and won't make
    such posts in the first place.

    But if you get upset, wait a while before writing your followup. I
    recommend waiting at least 30 minutes.

    "

    so I guess you are off the hook ... I'd rather opt for the "if you have
    nothing NICE or constructive to say"
    - then rather say nothing ...

    Maybe you could take a note from the above saying ....
     
    Tonino, Apr 4, 2005
    #8
  9. Also sprach Tonino:

    > *sigh* indeed - I was going to post a nasty reply but read the
    > guidelines :
    >
    > "
    > Count to ten before composing a followup when you are upset
    > This is recommended in all Usenet newsgroups. Here in clpmisc, most
    > flaming sub-threads are not about any feature of Perl at all! They are
    > most often for what was seen as a breach of netiquette. If you have
    > lurked for a bit, then you will know what is expected and won't make
    > such posts in the first place.
    >
    > But if you get upset, wait a while before writing your followup. I
    > recommend waiting at least 30 minutes.
    >
    > "
    >
    > so I guess you are off the hook ... I'd rather opt for the "if you have
    > nothing NICE or constructive to say"
    > - then rather say nothing ...


    What Sinan said apparently helped you to locate the posting guidelines.

    Other than that you've probably already lost. Thinskinned as you seem to
    be, you're not going to survive for a very long time in here.

    And meanwhile, you're still not providing context through quotes even
    though the guidelines describe an effective followup style in great
    detail. I am not surprised you missed that part but found the one you
    quoted above (which was not applicable in this situation).

    Tassilo
    --
    use bigint;
    $n=71423350343770280161397026330337371139054411854220053437565440;
    $m=-8,;;$_=$n&(0xff)<<$m,,$_>>=$m,,print+chr,,while(($m+=8)<=200);
     
    Tassilo v. Parseval, Apr 4, 2005
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthias S.

    Crossbrowser Colors for Input-Fields

    Matthias S., Mar 10, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    391
    John Colclough
    Mar 10, 2005
  2. Replies:
    5
    Views:
    3,439
    James Kanze
    Mar 4, 2008
  3. AAaron123

    TreeNode colors come from anchor colors

    AAaron123, Aug 7, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    547
    darrel
    Aug 7, 2008
  4. ZelluX
    Replies:
    3
    Views:
    1,907
    Peter Otten
    Dec 1, 2008
  5. multimatum2

    Changing disabled colors in an input text form

    multimatum2, Oct 5, 2004, in forum: Javascript
    Replies:
    4
    Views:
    191
    Michael Winter
    Oct 6, 2004
Loading...

Share This Page