home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Daytime Express
/
DaytimeExpress.cdr
/
007a
/
sl.slt
< prev
next >
Wrap
Text File
|
1991-08-04
|
2KB
|
81 lines
// Sample script file to log onto a SearchLight based system.
//
// note: _entry_pass is a system variable into which the dialing routines
// put whatever is in the password field of the dialing directory
// entry which was connected to.
//
str user_name[] = "Your Name Goes Here"; // put your name here
main()
{
int stat;
int t1,
t2,
t3,
t4,
t5;
int tmark;
alarm(1);
if (not _entry_pass) // no pass, so didn't recog. board
{
prints ("Sorry, I don't know the password for this BBS!");
return;
}
t1 = track(" [N]one", 1);
t2 = track("type NEW", 1);
t3 = track("Password?", 1);
t4 = track("[RETURN]",1);
t5 = track("Quit",1);
tmark = timer_start(1800); // wait up to 3 minutes for login
// answer any logon questions
while (not time_up(tmark))
{
terminal(); // let Telix process any chars and keys
stat = track_hit(0); // see which (if any) track was hit
if (stat == t1) // say whether we want graphics
{
delay(5);
cputs("c"); // c = use color,
// m = use mono,
// n = use none
cputs("^C");
}
else if (stat == t2) // send name
{
delay(1);
cputs(user_name);
cputs("^M");
}
else if (stat == t3) // send password
{
cputs(_entry_pass);
cputs("^M");
}
else if (stat == t4) // press Return automatically
{
cputs("^M");
}
else if (stat == t5) // don't read bulletins
{
cputs("Q");
break; // done with logon
}
}
if (time_up(1))
prints("Logon failed!");
timer_free(tmark); // free timer channel
track_free(0); // and all track channels
}