From the menu I'd like to have the following keyword sent into the MPL program. Then the MPL program will look for it and launch the keyword procedure.
i don't have code but it should be as easy as sending this keyword as a command line option and then just parse the command line to go do what
you want to do...
i don't have code but it should be as easy as sending this keyword as
a command line option and then just parse the command line to go do
what you want to do...
Darn, I need to see an example..
Darn, I need to see an example..
look at automessage.mps in your scripts directory... for that matter,
look at all of the mps files in there... but here's something real quick off the top of my head... no testing at all... there may be syntax errors...
----->8 snip ShowOptions.mps snip 8<-----
Procedure Do_Option1;
Begin
WriteLn('This is Option1');
End;
Procedure Do_Option2;
Begin
WriteLn('This is Option2');
End;
Procedure Do_Option3;
Begin
WriteLn('This is Option3');
End;
Begin
Case Upper(ParamStr(1)) of
'OPTION1' : Do_Option1;
'OPTION2' : Do_Option2;
'OPTION3' : Do_Option2;
Else
WriteLn('Invalid command line option.');
End;
WriteLn('|CR|PA');
End.
----->8 snip 8<-----
use it like this...
Hotkey: P
Command: GX (execute MPL)
Data: ShowOptions option1
Hotkey: D
Command: GX (execute MPL)
Data: ShowOptions option2
Hotkey: Q
Command: GX (execute MPL)
Data: ShowOptions option3
This is returning '0' to the log file when logging in from the command line. I wonder if possibly adding a servertype for local login might be simpler than doing the 'local' boolean. Perhaps adding servertype of 3
for local.
This is returning '0' to the log file when logging in from the
command line. I wonder if possibly adding a servertype for local
login might be simpler than doing the 'local' boolean. Perhaps
adding servertype of 3 for local.
I don't know what OS or version you're using but it seems to be
working from here I just tested it in Windows A48 and Linux. The
simple test I did was logged in and tried to download the BBS list and
on both OSes it says "Local mode:" and asked me to save.
Are you sure you're logging in with -L? Make sure you're not setting
the value of Local anywhere in any MPL anywhere, otherwise that will change it for the entire connection.
The ServerType that is used internally by Mystic for terminal services does have a Local mode value. They should be (as of A48 current releases):
0=telnet,1=rlogin,2=ssh,3=modem,4=local,5=other
Yes, logging in either is -L or running the mpl from a command prompt
with the './mystic -Uuser_Name -Ppassword -X'basicmpl test' format. Neither one will show the local as being true. Also, the variable is not being changed anywhere else in the code.
Ooooo. Didn't know about the others on here. So, when it's a local connection the servertype should also be showing as 4. Looks like I have some more playing to do. :)
Yes, logging in either is -L or running the mpl from a command
prompt with the './mystic -Uuser_Name -Ppassword -X'basicmpl
test' format. Neither one will show the local as being true.
Also, the variable is not being changed anywhere else in the
code.
The second one is not a local login because you're not telling it its
a local login with that command line. There is no -L
sudo ./mystic -l -ug00r00 -pMyPassword "-xbbslist bbslist"
Ooooo. Didn't know about the others on here. So, when it's a
local connection the servertype should also be showing as 4.
Looks like I have some more playing to do. :)
Probably depends on the version you're using but yes I think so.
I just upgraded to a48, at least for my test system here, and it seems
to be working now. It was strange that it wasn't in a47.
| Sysop: | Winzlo |
|---|---|
| Location: | Minnesota, USA |
| Users: | 11 |
| Nodes: | 16 (0 / 16) |
| Uptime: | 495934:09:24 |
| Calls: | 82 |
| Files: | 1,070 |
| D/L today: |
27 files (11,920K bytes) |
| Messages: | 286,920 |