home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-386-Vol-2of3.iso
/
c
/
crs-rose.zip
/
CRS-ROSE.SLT
next >
Wrap
Text File
|
1993-02-09
|
6KB
|
179 lines
// Telix script to log onto CRS and upload/download mail using
// the Rosemail door. Set download protocol to ZMODEM in
// Rosemail door. Substitute NAME, DIALING ENTRIES, PASSWORD and
// location of .REP file. Recompile with CS.EXE.
//
// Compliments of Robert Walker, February 10, 1993. Updates to
// follow along with HSLINK script.
//
// Function SHOWDAT() replaces "Press ALT-Z for Help" with date
//
str user_name[] = "ROBERT WALKER"; // INSERT YOUR NAME
str number_list[] = "7 8 9 10 11 12"; // INSERT DIALING DIRECTORY ENTRY NUMBERS
str pass_word[] = "12345678"; // INSERT YOUR PASSWORD
str file_name[] = "c:\olx\rep\crs.REP"; // INSERT COMPLETE PATH AND NAME
// OF YOUR CRS.REP FILE
int statline = 24; // Telix status line row
int statback = 3; // status line background color
int statfore = 0; // status line foreground color
main()
{
int stat;
int t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11;
int tmark;
int half_sec;
int pop_time;
clear_scr();
showname(); // REPLACES "PRESS ALT-Z FOR HELP"
// WITH DATE
capture("CRS.CAP"); // OPEN A CAPTURE FILE
redial(number_list,0,1); // DIAL THE NUMBER(S)
t1 = track("# to use", 0);
t2 = track(" graphics", 0);
t3 = track("first name?", 0);
t4 = track("Password",0);
t5 = track("(CR)more,(N)o More?", 0);
t6 = track("Scan Message Base", 0);
t7 = track("Main Board Command?", 0);
t9 = track("RoseMail Command", 0);
t10 = track("<NO TRANFER>", 0);
t11 = track("NO CARRIER", 0);
pop_time=30; // POP-UP WINDOW DELAY TIME
half_sec=2; // GLOBAL SCRIPT DELAY IN 1/10ths
// OF A SECOND. INCREASE IF YOU
// USE A HIGH-SPEED MODEM
tmark = timer_start(1800);
while (1)
{
terminal();
stat = track_hit(0);
if (stat == t1) // language to use
{
delay(half_sec);
cputc('1');
cputc('^M');
track_free(t1);
}
else if (stat == t2) // do you want graphics
{
delay(half_sec);
cputs("N Q");
cputc('^M');
track_free(t2);
}
else if (stat == t3) // what is your first name
{
delay(half_sec);
cputs(user_name);
cputc('^M');
track_free(t3);
track_free(t2);
}
else if (stat == t4) // what is your password
{
delay(half_sec);
cputs(pass_word);
cputc('^M');
track_free(t4);
}
else if (stat == t5) // more?
{
delay(half_sec);
cputs("n");
cputc('^M');
}
else if (stat == t6) // scan message base?
{
delay(half_sec);
cputs("n");
cputc('^M');
track_free(t6);
}
else if (stat == t7) // main board command
{
delay(half_sec);
cputs("ROSEMAIL");
cputc('^M');
track_free(t7);
}
else if (stat == t9) // RoseMail command?
{
track_free(t9);
delay(half_sec);
if (filefind(file_name, 0)) // is there a .REP in the upload dir
{
status_wind("REPLIES ", pop_time);
cputs("U");
cputc('^M');
delay_scr(half_sec);
send('Z',file_name); // there is a .REP so send it
delay_scr(half_sec);
delay_scr(half_sec);
fdelete(file_name); // delete the .REP file
delay(half_sec);
cputs("D Y G"); // let's download now
cputc('^M');
track_free(t9);
}
else
{
delay(half_sec); // there was *NO* .REP file
cputs("D Y G"); // so let's just download
cputc('^M');
track_free(t9);
}
}
else if (stat == t10) // no messages were found
{
status_wind("NO MESSAGES FOUND", pop_time);
cputs("g");
cputc('^M');
track_free(t10);
}
else if (stat == t11) // no carrier
{
timer_free(tmark);
capture("*CLOSE*");
hangup();
exittelix(0,1);
}
else if (not carrier (1))
{
capture("*CLOSE*");
hangup();
exittelix(0,1);
}
}
timer_free(tmark);
track_free(0);
hangup();
exittelix(0,1);
}
showname() // function to insert date
{
str s[15];
str name[15]; // name to display
int x, y; // old cursor position
date(curtime(),s); //
//
x = getx(); // save current position
y = gety(); //
//
substr(_entry_name, 0, 14, name); // get the current BBS name
if ((strlen(name) == 0) || (! carrier())) // no name or not connected?
strcat(s, " "); // pad name with spaces
pstraxy(" ", 1, statline, (statback * 16) + statfore);
pstraxy(s, 4, statline, (statback * 16) + statfore);
gotoxy(x, y); // return to saved position
}