Category : Communication (modem) tools and utilities
Archive   : MRUN200.ZIP
Filename : MRUN200F.WAS

 
Output of file : MRUN200F.WAS contained in archive : MRUN200.ZIP
;MailRun v2.00: Part F, othercmds
;1992 Gerald P. Sully, all rights reserved.


#define MRUN200F

#include "mrun200.h"

string ScriptList, MRunIcons
integer GetSendRadio, IconIndex


#comment
********************************************************

MAIN()

Calls checkchild(), getfilenames(), addgetmail(),
addsendcommand(), adddoscript(), showabout(), menudim()

Calls the appropriate function based on the value of
FLAGS.

********************************************************
#endcomment

proc main
integer cmdstatus
menudim()
checkchild()
getfilenames()
findfirst MailRun
MailRunTrunc = $FILENAME
profilerd MailRun "MailRun" "Archiver" Archiver
profilerd MailRun "MailRun" "QWKReader" QWKReader
profilerd MailRun "MailRun" "LogViewer" LogViewer
cmdstatus = FLAGS & (AGM + CMD + SCR + ABT)
switch cmdstatus
case AGM
addgetmail()
endcase
case CMD
addsendcommand()
endcase
case SCR
adddoscript()
endcase
case ABT
showabout()
endcase
endswitch
endproc

#comment
********************************************************

ADDGETMAIL()

Called by main()

Calls getbbsi(), getitemi(), getbbscoord(), getitemcoord(),
getmailbox(), gettaskstring(), maketasklist(), makebbslist(),
checkperm(), insertitem()

Adds a GetMail item to the mailrun.

********************************************************
#endcomment

proc addgetmail
string GetMailString, StatString
string GetSendMail
string Perm
integer dialogstatus
integer i, j
i = getbbsi()
j = getitemi()
makebbslist()
getmailbox()
statmsg ""
interfaceon()
while 1
dialogstatus = $DIALOG
switch dialogstatus
case 10
;User selected "Add"
if GetSendRadio == 1
GetSendMail = "GetMail"
strfmt StatString "Added to %s: `"Get QWK Packet`"" BBS
else
GetSendMail = "SendMail"
strfmt StatString "Added to %s: `"Send REP Packet`"" BBS
endif
Perm = checkperm()
strfmt GetMailString "1,%s,%s" Perm GetSendMail
;Update MAILRUN.INI, task list
j++
insertitem(j, GetMailString)
TaskItem = gettaskstring(i, j)
statmsg StatString
endcase
case 11
;User selected "Done"
exit
endcase
case 170
;User changed BBS with combobox
i = getbbscoord()
j = getitemcoord()
TaskItem = gettaskstring(i, 0)
endcase
endswitch
endwhile
endproc


#comment
********************************************************

GETMAILBOX()

Called by getmail()

Displays the Get/Send Mail dialog box.

********************************************************
#endcomment

proc getmailbox
PermRadio = 1
GetSendRadio = 1
destroydlg
HelpPage = 8
dialogbox 52 68 243 93 15 "Get/Send Mail" HELPID HelpPage
radiobutton 16 44 54 14 "Get Mail" GetSendRadio
radiobutton 16 63 54 14 "Send Mail" endgroup
radiobutton 94 44 54 14 "Permanent" PermRadio
radiobutton 94 63 54 14 "Temporary" endgroup
pushbutton 184 44 40 14 "&Add" normal default
pushbutton 184 63 40 14 "&Done" normal
text 52 12 68 8 right "Get/Send Mail for:"
combobox 124 10 67 41 BBSList BBS sort
enddialog
endproc


#comment
********************************************************

ADDSENDCOMMAND()

Called by main()

Calls getbbsi(), getitemi(), getbbscoord(), getitemcoord(),
gettaskstring(), maketasklist(), makebbslist(),
sendcommandbox(), checkperm(), insertitem()

Adds a "SendCommand" item to the mailrun. A command
string may contain multiple command lines separated by
verticle bars. Successive command lines will be sent
when the terminal screen is quiet for 15 seconds.

********************************************************
#endcomment

proc addsendcommand
string CommandString, StatString
string Perm
integer dialogstatus
integer i, j
i = getbbsi()
j = getitemi()
makebbslist()
sendcommandbox()
statmsg ""
interfaceon()
while 1
dialogstatus = $DIALOG
switch dialogstatus
case 10
;User selected "Add"
Perm = checkperm()
strfmt CommandString "1,%s,SendCommand,%s" Perm Command
strfmt StatString "Added to %s: `"Send Command: %s`"" \
BBS Command
j++
insertitem(j, CommandString)
TaskItem = gettaskstring(i, j)
statmsg StatString
endcase
case 11
;User selected "Done"
exit
endcase
case 170
;User changed BBS with the combobox
i = getbbscoord()
j = getitemcoord()
TaskItem = gettaskstring(i, 0)
endcase
endswitch
endwhile
endproc


#comment
********************************************************

SENDCOMMANDBOX()

Called by sendcommand()

Displays the Send Command dialog box.

********************************************************
#endcomment

proc sendcommandbox
PermRadio = 2
assign Command ""
destroydlg
HelpPage = 11
dialogbox 92 63 196 124 15 "Send Command" HELPID HelpPage
text 8 39 42 8 right "Command:"
editbox 54 37 124 11 Command
radiobutton 32 85 59 11 "Permanent" PermRadio
radiobutton 32 101 59 11 "Temporary" endgroup
pushbutton 129 77 40 14 "&Add" normal default
pushbutton 129 97 40 14 "&Done" normal
text 30 15 68 8 right "Send Command to:"
combobox 102 13 65 42 BBSList BBS sort
text 54 51 97 8 left "Use a vertical bar (`"|`") to"
text 54 61 97 8 left "separate multiple commands."
enddialog
endproc


#comment
********************************************************

ADDDOSCRIPT()

Called by main()

Calls getbbsi(), getitemi(), getbbscoord(), getitemcoord(),
maketasklist(), makebbslist(), makescriptlist(),
gettaskstring(), scriptbox(), checkperm(), insertitem()

Adds a SendScript Item to the mailrun.

********************************************************
#endcomment

proc adddoscript
string ScriptString, StatString
string Perm
integer dialogstatus
integer i, j
i = getbbsi()
j = getitemi()
makebbslist()
makescriptlist()
scriptbox()
statmsg ""
interfaceon()
while dialogstatus != 1
dialogstatus = $DIALOG
switch dialogstatus
case 10
;User chose "Add"
Perm = checkperm()
strupr ScriptName
strfmt ScriptString "1,%s,SendScript,%s" Perm ScriptName
strfmt StatString "Added to %s: `"Execute Script: %s`"" \
BBS ScriptName
j++
insertitem(j, ScriptString)
TaskItem = gettaskstring(i, j)
statmsg StatString
endcase
case 11
;User selected "Done"
exit
endcase
case 170
;User changed BBS with the combobox
i = getbbscoord()
j = getitemcoord()
TaskItem = gettaskstring(i, 0)
endcase
endswitch
endwhile
endproc


#comment
********************************************************

MAKESCRIPTLIST()

Called by addscript()

Calls openerror()

Creates a list of scripts for display in the scriptbox()
dialog box script fcombobox.

********************************************************
#endcomment

proc makescriptlist
string ScriptSpec, NextScript
ScriptName = ""
ScriptList = makefullname(TempDir, "SCRIPTS.TMP")
fopen ScriptFile ScriptList CREATE
openerror(ScriptList)
fetch aspect defaultpath ScriptSpec
addfilename ScriptSpec "*.WAX"
findfirst ScriptSpec
;Loop through all files in the directory
while FOUND
NextScript = $FILENAME
strlwr NextScript
switch NextScript
case "MAILRUN.WAX"
case "MRUN200A.WAX"
case "MRUN200B.WAX"
case "MRUN200C.WAX"
case "MRUN200D.WAX"
case "MRUN200E.WAX"
case "MRUN200F.WAX"
case "HOST.WAX"
case "HOSTUTIL.WAX"
case "USER.WAX"
case "SUBS.WAX"
case "MAIL.WAX"
endcase
default
fstrfmt ScriptFile "%s`r`n" NextScript
if NULLSTR ScriptName
ScriptName = NextScript
endif
endcase
endswitch
findnext
endwhile
fclose ScriptFile
endproc


#comment
********************************************************

SCRIPTBOX()

Called by addscript()

Displays the Execute Script dialog box.

********************************************************
#endcomment

proc scriptbox
PermRadio = 2
destroydlg
HelpPage = 12
dialogbox 92 60 180 135 15 "Execute Script" HELPID HelpPage
text 14 36 64 8 right "Available Scripts:"
fcombobox 82 34 76 42 ScriptList ScriptName sort
text 20 54 136 22 left "WARNING: Scripts must not alter \
global variables s0-s9 and i0-i9!!!"
radiobutton 17 85 62 14 "Permanent" PermRadio
radiobutton 17 107 62 14 "Temporary" endgroup
pushbutton 114 85 40 14 "&Add" normal default
pushbutton 114 107 40 14 "&Done" normal
text 14 11 64 8 right "Execute Script at:"
combobox 82 9 76 42 BBSList BBS sort
enddialog
endproc


#comment
********************************************************

SHOWABOUT()

Called by main()

Calls aboutbox(), makefullname

Displays the About MailRun dialog box.

********************************************************
#endcomment

proc showabout
integer dialogstatus
MRunIcons = makefullname(MailRunDir, "MRUNICON.DLL")
IconIndex = 17
statmsg ""
aboutbox()
dialogstatus = $DIALOG
while dialogstatus != 1
dialogstatus = $DIALOG
endwhile
exit
endproc


#comment
********************************************************

ABOUTBOX()

Called by showabout()

Displays the About MailRun dialog box.

********************************************************
#endcomment

proc aboutbox
destroydlg
HelpPage = 1
dialogbox 55 55 220 151 15 "About MailRun" HELPID HelpPage
text 42 14 136 27 center "MailRun`r`nVersion 2.00`r`n\
Copyright © 1992-1993 Gerald P. Sully"
text 20 48 180 28 left "If you use MailRun with any regularity, \
ease your aching conscience by helping out a starving author.`r`n\
Send $15 to:"
icon 160 82 MRunIcons IconIndex
text 20 80 120 44 left "Jerry Sully`r`n841 Solano Ave. #2`r`n\
Albany, CA 94706`r`n`r`nThank you for your support!"
pushbutton 20 128 180 12 "I promise I'll send $15 as soon as I \
can afford it!" cancel
enddialog
endproc


  3 Responses to “Category : Communication (modem) tools and utilities
Archive   : MRUN200.ZIP
Filename : MRUN200F.WAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/