• Issue with MPL script

    From TALIADON@21:3/138 to All on Friday, January 07, 2022 19:39:01
    Hi all,

    I'm currently having a play around with MPL scripts (A46 Win32) and appear to have run into an issue regarding the 'KeyPressed/ReadKey' functions in the following code:

    ----------

    var gExitFlag : boolean;
    var gCount : integer;

    begin
    gExitFlag := false;
    repeat
    write('|[X00|[Y00' + int2str(gCount));
    gCount := gCount + 1;
    if (keypressed()) then
    begin
    if ('q' = readkey()) then
    gExitFlag := true;
    end
    until gExitFlag = true;
    end.

    ----------

    The code appears to run as expected when I connect via syncterm, but the netrunner client appears to send a periodic heartbeat code which forces
    the KeyPressed function to return 'true'. I'm not sure which code netrunner
    is sendind, but it appears to stall the subsequent call to ReadKey - pressing
    a key allows the script to continue until the next heartbeat code is sent.

    Most of this is largely supposition, but perhaps the heartbeat code is
    fooling ReadKey into waiting for a multi-byte sequence? Failing that, perhaps there's an error in the script somewhere?

    Any help and/or advice would be greatly appreciated.

    o-----------o------------o-------------------------o
    TALIADON | 2:250/6 | 21:3/138 | TALIADON-BBS@MAIL.COM | o-----------o-----------o------------o-------------------------o
    | "Error is a great teacher, and humility its hardest lesson." | o--------------------------------------------------------------o

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: TALIADON BBS (21:3/138)
  • From seeLive@21:2/128 to TALIADON on Friday, January 07, 2022 17:54:17
    On 07 Jan 2022, TALIADON said the following...
    Most of this is largely supposition, but perhaps the heartbeat code is fooling ReadKey into waiting for a multi-byte sequence? Failing that, perhaps there's an error in the script somewhere?

    One thing you can is to turn on the capture buffer in syncterm and look to see what's it's sending... at least you can see the sequence and code for it...


    Also, check the MPL docs I sent you today... it has a working example of the keypress thing....

    _____________________________________________________________________

    (,``,"> rusty sez... Re-livin' the dream...

    --- Mystic BBS v1.12 A47 2021/12/24 (Raspberry Pi/32)
    * Origin: seeLive's rustyHedgehog - therhh.dynv6.net:2300 (21:2/128)
  • From TALIADON@21:3/138 to seeLive on Saturday, January 08, 2022 00:24:46
    One thing you can is to turn on the capture buffer in syncterm and look
    to see what's it's sending... at least you can see the sequence and code for it...

    Ironically, syncterm appears to be playing ball: it's netrunner (my preferred client) which seems intent on sinking my battle ship.

    I've contacted g00r00, and he's asked me to test it on A47. I needed to set
    up a bare bones system in preparation for Avon's tutorials, so I'll get that done tomorrow.

    Also, check the MPL docs I sent you today... it has a working example of the keypress thing....

    You are worth your weight in gold. Very much appreciated!!!

    o-----------o------------o-------------------------o
    TALIADON | 2:250/6 | 21:3/138 | TALIADON-BBS@MAIL.COM | o-----------o-----------o------------o-------------------------o
    | "Error is a great teacher, and humility its hardest lesson." | o--------------------------------------------------------------o

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: TALIADON BBS (21:3/138)
  • From seeLive@21:2/128 to TALIADON on Friday, January 07, 2022 20:27:18
    On 08 Jan 2022, TALIADON said the following...
    Ironically, syncterm appears to be playing ball: it's netrunner (my preferred client) which seems intent on sinking my battle ship.

    yeah, you did say netrunner... does that have a capture buffer as well...? I haven't tried it yet... not sure if there's a mac version :-/

    You are worth your weight in gold. Very much appreciated!!!

    anytime...

    _____________________________________________________________________

    (,``,"> rusty sez... Re-livin' the dream...

    --- Mystic BBS v1.12 A47 2021/12/24 (Raspberry Pi/32)
    * Origin: seeLive's rustyHedgehog - therhh.dynv6.net:2300 (21:2/128)