I'm playing around with some MPL scripting and I read somewhere that somebody had some good documentation and/or maybe some good API
references for Mystic Scripting. Does anyone know where I can find that?
I'm wanting to write a script that can invoke HTTP requests and also do telnet. I know there are some components you can "use" but I'm really not sure whats available.
Sounds like you'd want to use Mystic Python for that. MPL is pretty locked down as far as getting outside of the BBS. Python gives you more control.
Sounds like you'd want to use Mystic Python for that. MPL is pretty locked down as far as getting outside of the BBS. Python gives you m control.
Are there some API references/documentation for this? Sounds like I've
got a lot to learn! :)
--- Mystic BBS v1.12 A44 2020/02/04 (Windows/32)
* Origin: Dave's BBS (21:1/140)
Sounds like you'd want to use Mystic Python for that. MPL is pretty locked down as far as getting outside of the BBS. Python gives you m control.
Are there some API references/documentation for this? Sounds like I've
got a lot to learn! :)
Are there some API references/documentation for this? Sounds like I'v got a lot to learn! :)
Python is Python, so there are plenty of resources on how to do stuff
with Python 2.7 on the interwebs along with packages to do various
things. All of the Python 2.7 stuff applies to Mythic too.
Thanks I've been goign through the documentation and wrote a little
script to test things out. So I can use regular python code along with
the mystic functins from within my MPY script? This is pretty powerful!
As far as the Mystic-specific functions there is msgread.mpy and filelist.mpy that come with Mystic as examples of read messages and listing files. I believe the whatsnew files have all of the functions documented in them, and there is a page on the Wiki that is being built with a function reference (but mostly unfinished - ask me to document a function and I will)
OK I'm lokoing through the Functin List on the wiki site. One of the commands is menucmd. If I'm correct in my assuption, I could use this to execute an Outbound telnet command to connect to a remote system? Would the command and the data for the IT command be in seperate parameters? I tried a few different variations but didn't get any sort of response.
execute an Outbound telnet command to connect to a remote system? Would the command and the data for the IT command be in seperate parameters? I tried a few different variations but didn't get any sort of response.
Yes, you could do the IT with menucmd in MPL or MPY if you wanted to (or directly from a menu of course). In MPL it would be:
Begin
MenuCmd('IT', '/addr=mybbs.com');
End.
I figured it out:
menucmd("IT", "/addr=games.bbslink.net /port=23")
One more question; Is there a way to pass arguments in to a .mpy script via data on a menu command?
One more question; Is there a way to pass arguments in to a .mpy script via data on a menu command?
MenuCmd('IT', '/addr=mybbs.com');
Yes, you can just add the arguments after the script name on the DATA command. Inside Python, just use "param_str" from mystic_bbs. For instance:
Command: GY
Data: script_name arg1 arg2
Then in the script:
value1 = param_str(1)
value2 = param_str(2)
MenuCmd('IT', '/addr=mybbs.com');
This hasn't ever worked for me, btw. It works in MPY, I think, but not MPL.
I can't seem to reproduce that issue. I tested telnet, rlogin and SSH with A45 in Linux and Windows yesterday from both a menu and MPL. I am not sure where to go with it. I did find that SSH outbound was broken
at one point recently and I have fixed that part but it wasn't specific
to MPL.
I can't seem to reproduce that issue. I tested telnet, rlogin and SS with A45 in Linux and Windows yesterday from both a menu and MPL. I not sure where to go with it. I did find that SSH outbound was broke at one point recently and I have fixed that part but it wasn't specif to MPL.
Excellent! I'll test it out in that case to see if it's also fixed on my end. Thanks! Perhaps it was something that was fixed at some point and I wasn't tracking.
Sysop: | Eric Oulashin |
---|---|
Location: | Beaverton, Oregon, USA |
Users: | 95 |
Nodes: | 16 (0 / 16) |
Uptime: | 01:38:46 |
Calls: | 4,646 |
Calls today: | 9 |
Files: | 8,491 |
Messages: | 348,699 |
Posted today: | 1 |