• Display a long text file with pauses

    From The Lizard Master@VERT/NITEEYES to All on Monday, December 14, 2020 10:20:53
    Is there a function I can call to dislay a text file with pauses.

    I can read the text file into a variable and then display the file, but it's just a dump. I figured there is probably a display file function I'm missing.

    Thanks!

    ---TLM

    ---
    þ Synchronet þ Nite Eyes BBS - To make people happy about my tagline everywhere...
  • From Gamgee@VERT/PALANT to The Lizard Master on Monday, December 14, 2020 17:23:00
    The Lizard Master wrote to All <=-

    Is there a function I can call to dislay a text file with pauses.

    I can read the text file into a variable and then display the
    file, but it's just a dump. I figured there is probably a
    display file function I'm missing.

    Yep, you can do this with either a "Ctrl-A code" or an "@-code".

    Both are explained on the Wiki:

    http://wiki.synchro.net/custom:ctrl-a_codes#control

    http://wiki.synchro.net/custom:atcodes#terminal_information_control

    The "@-code" is probably easier. Just embed a "@PAUSE@" (without the
    quotes) in your file at the appropriate place(s).



    ... Press any key to continue or any other key to quit
    --- MultiMail/Linux v0.52
    þ Synchronet þ Palantir BBS * palantirbbs.ddns.net * Pensacola, FL
  • From The Lizard Master@VERT/NITEEYES to Gamgee on Monday, December 14, 2020 20:23:35
    Re: Re: Display a long text file with pauses
    By: Gamgee to The Lizard Master on Mon Dec 14 2020 05:23 pm

    Yep, you can do this with either a "Ctrl-A code" or an "@-code".

    Both are explained on the Wiki:

    http://wiki.synchro.net/custom:ctrl-a_codes#control

    http://wiki.synchro.net/custom:atcodes#terminal_information_control

    The "@-code" is probably easier. Just embed a "@PAUSE@" (without the quotes) in your file at the appropriate place(s).

    My fault I wasn't more clear. It's a text file generated nightly. I won't be able to add @ codes. I thought maybe there was a displayfile(); function or something I could use to write it to the screen.

    Right now I'm doing something like this -

    var lines=f.readAll();
    f.close();
    Unlock(f.name);
    dk.console.attr="G"
    dk.console.println(lines.join("\r\n"));

    This works fine, but it comes out as one big dump and everyone has to scroll up to read the results. Thanks!

    ---TLM

    ---
    þ Synchronet þ Nite Eyes BBS - To make people happy about my tagline everywhere...
  • From Digital Man@VERT to The Lizard Master on Monday, December 14, 2020 21:06:36
    Re: Display a long text file with pauses
    By: The Lizard Master to All on Mon Dec 14 2020 10:20 am

    Is there a function I can call to dislay a text file with pauses.

    I can read the text file into a variable and then display the file, but it's just a dump. I figured there is probably a display file function I'm missing.

    The easiest method is console.printfile().

    If you want to do it more manually for some reason, you can use the File methods to read the data and then console.putmsg() to display it (with screen-pauses).
    --
    digital man

    Synchronet/BBS Terminology Definition #6:
    BinkD = Binkley Daemon
    Norco, CA WX: 55.5øF, 38.0% humidity, 1 mph S wind, 0.02 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Gamgee on Monday, December 14, 2020 21:12:22
    Re: Re: Display a long text file with pauses
    By: Gamgee to The Lizard Master on Mon Dec 14 2020 05:23 pm

    The "@-code" is probably easier. Just embed a "@PAUSE@" (without the quotes) in your file at the appropriate place(s).

    I don't recommend this approach for several reasons:
    - You probably don't want to modify the file in question
    - Not every user's terminal screen is the same length (number of rows)

    Best to leave the auto-screen-pausing to the BBS software.
    --
    digital man

    Synchronet "Real Fact" #68:
    Robert D. Bouman, the author of SyncEdit, died in the mid to late 1990's. Norco, CA WX: 55.5øF, 38.0% humidity, 1 mph S wind, 0.02 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From The Lizard Master@VERT/NITEEYES to Digital Man on Tuesday, December 15, 2020 09:47:54
    Re: Display a long text file with pauses
    By: Digital Man to The Lizard Master on Mon Dec 14 2020 09:06 pm

    The easiest method is console.printfile().

    If you want to do it more manually for some reason, you can use the File methods to read the data and then console.putmsg() to display it (with screen-pauses).

    Ahhh thanks! I'll try that, that's probably what I was looking for.

    ---TLM

    ---
    þ Synchronet þ Nite Eyes BBS - To make people happy about my tagline everywhere...
  • From The Lizard Master@VERT/NITEEYES to Digital Man on Tuesday, December 15, 2020 10:32:40
    Re: Display a long text file with pauses
    By: The Lizard Master to Digital Man on Tue Dec 15 2020 09:47 am

    The easiest method is console.printfile().

    If you want to do it more manually for some reason, you can use the File methods to read the data and then console.putmsg() to display it (with screen-pauses).

    Ahhh thanks! I'll try that, that's probably what I was looking for.

    ---TLM

    Yes! Worked perfect! Thanks!

    ---TLM

    ---
    þ Synchronet þ Nite Eyes BBS - To make people happy about my tagline everywhere...