• console.ungetstr command

    From High Spirit@VERT/DCBBS to All on Tue Jan 9 12:25:55 2018
    Can someone tell me how this command works? Where do I put the string that I want in the buffer?

    Thanks! :)

    -- High Spirit Digital Realms Main - connect.digitalrealms.net 23
    Digital Realms C=64 - connect.digitalrealms.net 6400

    ---
    ■ Synchronet ■ Digital Realms BBS - connect.digitalrealms.net:23
  • From echicken@VERT/ECBBS to High Spirit on Tue Jan 9 13:54:35 2018
    Re: console.ungetstr command
    By: High Spirit to All on Tue Jan 09 2018 12:25:55

    Can someone tell me how this command works? Where do I put the string that I want in the buffer?

    http://synchro.net/docs/jsobjs.html#console

    The console.ungetstr method inserts an arbitrary string into the input buffer (essentially makes it as if the user typed the string).

    console.clear(15);
    console.ungetstr('test test test\r\n');
    var str = console.getstr();
    console.putmsg(str);
    console.pause();


    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
  • From High Spirit@VERT/DCBBS to echicken on Tue Jan 9 14:32:24 2018
    Re: RE: console.ungetstr command
    By: echicken to High Spirit on Tue Jan 09 2018 01:54 pm

    console.ungetstr('test test test\r\n');

    Well sh*t... I swear I tried that and it threw me an error...

    -- High Spirit Digital Realms Main - connect.digitalrealms.net 23
    Digital Realms C=64 - connect.digitalrealms.net 6400

    ---
    ■ Synchronet ■ Digital Realms BBS - connect.digitalrealms.net:23
  • From Nightfox@VERT/DIGDIST to High Spirit on Tue Jan 9 12:36:18 2018
    Re: console.ungetstr command
    By: High Spirit to All on Tue Jan 09 2018 12:25 pm

    Can someone tell me how this command works? Where do I put the string that I want in the buffer?

    From what I remember, you can pass a string to console.ungetstr and the next time you input a string from the user (using a console.get function), the string you passed to ungetstr will be part of the string you input from the user next time.

    Oddly, the Synchronet JavaScript Object Model documentation currently does not show that console.ungetstr() takes any parameters.. I have always passed a string to it, and I don't remember where I learned to do that.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com