• console.clear()

    From Mindless Automaton@ELDRITCH to DOVE-Net.Programming_(Javascript) on Wednesday, August 26, 2015 11:31:17
    I am messing around with the login.js and if I add console.clear() after console.print("\r\nNN:\b\b\bLogin: \1w"); I get a [Hit a Key] pause
    prompt before it clears.

    Is it possible to prevent the pause here? I dont seem to get a pause
    when I use console.clear() in other scripts.

    Thanks!

    Mindless Automaton
    ---
    þ Synchronet þ Eldritch Clockwork BBS - eldritch.darktech.org
  • From echicken@ECBBS to Mindless Automaton on Wednesday, August 26, 2015 12:53:46
    Re: console.clear()
    By: Mindless Automaton to DOVE-Net.Programming_(Javascript) on Wed Aug 26 2015 11:31:17

    I am messing around with the login.js and if I add console.clear() after console.print("\r\nNN:\b\b\bLogin: \1w"); I get a [Hit a Key] pause prompt before it clears.

    Is it possible to prevent the pause here? I dont seem to get a pause
    when I use console.clear() in other scripts.

    If you remove the console.clear() statement, is there still a pause before the next bit of output appears in the terminal?

    You could try adding a 'console.line_counter = 0;' and/or a 'console.clear();' to the top of the script to see if that makes it go away.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
  • From Mindless Automaton@ELDRITCH to echicken on Wednesday, August 26, 2015 16:06:11
    On 8/26/2015 12:53 PM, echicken wrote:

    MA> Is it possible to prevent the pause here? I dont seem to get a pause
    MA> when I use console.clear() in other scripts.

    If you remove the console.clear() statement, is there still a pause before the
    next bit of output appears in the terminal?

    You could try adding a 'console.line_counter = 0;' and/or a 'console.clear();'
    to the top of the script to see if that makes it go away.


    Resetting line_counter did it. Thanks.

    What I am doing is after the CLIENT CONN, etc. info is a printfile a
    ansi and then use console.up/down/left/right to position the cursor so
    the username and stuff can be entered.

    Unfortunately when you just hit enter, everything is moved 1 row and
    then the menu is redrawn over that mess.

    So currently I just clear it and redraw it. :p

    -Mindless Automaton
    ---
    þ Synchronet þ Eldritch Clockwork BBS - eldritch.darktech.org