• MPY initiate text editor

    From xqtr@21:1/111 to All on Sun Mar 8 17:47:10 2020
    Is there a way to initiate the text editor from MPY? I know that for MPL it
    is, but can't find it for MPY, except from making a MPL script just to use the editor and execute it from an MPY script :?

    :: XQTR :: Another Droid BBS :: andr01d.zapto.org:9999 :: xqtr@gmx.com

    --- Mystic BBS v1.12 A45 2020/02/18 (Raspberry Pi/32)
    * Origin: Another Droid BBS # andr01d.zapto.org:9999 (21:1/111)
  • From g00r00@21:1/108 to xqtr on Mon Mar 9 07:32:30 2020
    Is there a way to initiate the text editor from MPY? I know that for MPL it is, but can't find it for MPY, except from making a MPL script just
    to use the editor and execute it from an MPY script :?

    Which one do you want access to, the text editor or the msg/ANSI editor?

    I need to get both of them accessible, but I suspect (without looking yet)
    that I could wrap the text editor pretty quickly into MPY for you.

    The msg/ANSI editor is going to be more work but I also need to get that in there too.

    --- Mystic BBS v1.12 A46 2020/03/08 (Windows/64)
    * Origin: Sector 7 (21:1/108)
  • From xqtr@21:1/111 to g00r00 on Mon Mar 9 12:31:03 2020
    Which one do you want access to, the text editor or the msg/ANSI editor?

    Preferably the msg. editor but even with the text editor i can use it to write a msg and post it with the appropriate command.

    I need to get both of them accessible, but I suspect (without looking
    yet) that I could wrap the text editor pretty quickly into MPY for you.

    No need to do it just for me. I can use a MPL script, as i have done before :)

    The msg/ANSI editor is going to be more work but I also need to get that in there too.

    I am writing a different Message Index reader in MPY and all the message base commands/functions like msg_gettxt, base stats, reading the bases internally helped a lot. What i didn't find and made my own functions is to mark a base
    as read (increase the counter in the jlr file), a way to write a reply
    (message editor) and a message viewer, that could display a msg without the need to save the text in a file and then invoke the ansi viewer. With those i think the whole Message Base set of functions should be complete :)

    :: XQTR :: Another Droid BBS :: andr01d.zapto.org:9999 :: xqtr@gmx.com

    --- Mystic BBS v1.12 A45 2020/02/18 (Raspberry Pi/32)
    * Origin: Another Droid BBS # andr01d.zapto.org:9999 (21:1/111)
  • From g00r00@21:1/108 to xqtr on Mon Mar 9 21:34:37 2020
    internally helped a lot. What i didn't find and made my own functions is to mark a base as read (increase the counter in the jlr file), a way to

    I have added these functions for you so far. They will be in the next pre-alpha build but they're untested right now. These were easy to add so I got them but some of the other stuff will be a little harder.

    [snip]

    + Two new Python functions: msg_getlr and msg_setlr to get and set the
    lastread pointer for the currently opened message base.

    Syntax: msg_getlr (msgbase, userID) returns last read message
    Ex: lastread = msg_getlr(msgbase, user["id"])

    msgbase is the open message base pointer returned by msg_open
    userID is the user's unique ID found in the "id" field of a user
    lastread is a signed 32-bit integer of the last read message which can
    be passed to msg_seek, for example.

    Syntax: msg_setlr (msgbase, userID, userHandle, lastread)
    Ex: msg_setlr (msgbase, user["id"], user["handle"], lastread)

    The user handle should always be passed (not the real name) as this value
    will be hashed as required when a new last read record needs to be added
    for the user.

    --- Mystic BBS v1.12 A46 2020/03/09 (Windows/64)
    * Origin: Sector 7 (21:1/108)
  • From xqtr@21:1/111 to g00r00 on Mon Mar 9 16:28:50 2020
    I have added these functions for you so far. They will be in the next pre-alpha build but they're untested right now. These were easy to add
    so I got them but some of the other stuff will be a little harder.

    Respect! :) Thank you!

    :: XQTR :: Another Droid BBS :: andr01d.zapto.org:9999 :: xqtr@gmx.com

    --- Mystic BBS v1.12 A45 2020/02/18 (Raspberry Pi/32)
    * Origin: Another Droid BBS # andr01d.zapto.org:9999 (21:1/111)