Category : Files from Magazines
Archive   : SMALLCOM.ZIP
Filename : PROCOMM.SCR
* PROCOMM.SCR : A SMALLCOM script that calls a ProComm system,
* downloads a file, and uploads another file
*/
/* ----- key strings that ProComm sends ----- */
char *strs[] = {
"choice?",
"Denied"
};
char *Name = "Name:";
char *Password = "Password:";
char *choice = "choice?";
char *procedure = "procedure.";
char *spec = "spec?";
/* -------- strings that SMALLCOM sends -------------- */
char *name = "Al Stevens\r";
char *password = "PASSWORD\r";
char *filename1 = "test1.fil";
char *filename2 = "test2.fil";
/* -------- poor man's #define or enum ---------- */
int CHOICE = 0;
int DENIED = 1;
int XMODEM = 'X';
int UPLOAD = 'u';
int DOWNLOAD = 'd';
int GOODBYE = 'g';
/* -------- main entrance to the script --------- */
main()
{
message(" --> Signing on to ProComm <--");
if (signon()) {
downloadops();
uploadops();
waitfor(choice);
message(" Signing Off");
sendchar(GOODBYE);
}
else
message(" Not allowed access! ");
hangup();
}
/* ---------- sign on and send the password ----------- */
signon()
{
waitfor(Name);
sendstring(name);
waitfor(Password);
sendstring(password);
if (waitforstrings(strs) == CHOICE)
return 1;
return 0;
}
/* --------- download a file ---------- */
downloadops()
{
message(" Downloading");
sendchar(DOWNLOAD);
waitfor(choice);
sendchar(XMODEM);
waitfor(spec);
sendstring(filename1);
sendchar('\r');
waitfor(procedure);
download(filename1, XMODEM);
system("del download.fil");
system("ren test1.fil download.fil");
}
/* --------- upload a file ---------- */
uploadops()
{
waitfor(choice);
message(" Uploading");
sendchar(UPLOAD);
waitfor(choice);
sendchar(XMODEM);
waitfor(spec);
sendstring(filename2);
sendchar('\r');
waitfor(procedure);
upload(filename2, XMODEM);
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/