• console.ungetstr command

    From High Spirit@DCBBS to All on Tuesday, January 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?

    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@ECBBS to High Spirit on Tuesday, January 09, 2018 13:54:35
    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@DCBBS to echicken on Tuesday, January 09, 2018 14:32:24
    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@DIGDIST to High Spirit on Tuesday, January 09, 2018 12:36:18
    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