TIP: Click on subject to list as thread! ANSI
echo: telix
to: LUC LEBRUN
from: RICK COLLINS
date: 1997-10-13 09:31:00
subject: startup script 3.22/3.51 DOS

Hi Luc,
In a message to All you wrote:
 LL> Hi to all!!
 LL>   I'm looking for help on making a startup script to run with
 LL>   Telix 3.22/3.51 Dos.
 LL>   When telix starts i need to clear the screen, then call the
 LL>   dialing
 LL>   directories tagged all the entries in it, then dials them.
This will do pretty much what you want (and maybe a little more).  As 
written, it handles 5 different numbers (you can extend that if you like by 
adding more entries.  As it is shown, it dials the first four numbers _only_ 
if there is a reply packet for that system, otherwise, it skips them.  It 
_always_ dials the last number.  Also note that the last BBS has four lines, 
so the script will try all four numbers sequentially until it's successful.  
Once it makes a connection on _any_ of those four lines, it will not dial 
that system again unless re-started.
As written, it assumes that each dialing directory entry has an associated 
script that handles connect, login, download, upload, logoff, and disconnect. 
So, in use, it dials the system, performs the mail handling, disconnects, and 
then tries the next system, etc.  It also writes results to a log file and 
displays the results of the session on-screen.
=== begin SELECT.SLT ===
//******************** SELECT.SLT ***********************************
//
// Rick Collins, Wizard Systems Copyright 17 Jul7 1995
//
//	This script will dial selected phonebook entries
//	sequentially until a connect is achieved on any number.
//	The script is suspended while carrier is present which
//	allows a script for that BBS to run normally for mail
//	retreival, etc.  The user may also conduct on-line operations.
//	When carrier is lost, the script resumes sequential dialing, 
//	but excludes numbers at which a connect has been achieved.
//
//******************************************************************
//
//	The script will handle up to 5 different numbers as written. 
//	Additional numbers may be added as desired by simply extending
//	the script.
//_______________________________________________________________
int A=0, B=0, C=0, D=0, E=10;  // 10 tries for each number
int F=10, G=10, H=10, AZ=0, BZ=0, CZ=0, DZ=0, EZ=0;
int PAUSE=30; // delay 3 seconds between each attempt
str heart[] = "d:\comm\up\hbeat131.rep";
str ready[] = "d:\comm\up\r&d_msg.rep";
str tree[] =  "d:\comm\up\treehous.rep";
str log[] = "d:\tlx\telix.log";
main()
{
usagelog (log);
ustamp("******** Select Script Started **********",1,1);
if (fileattr(heart) > 0)  B=10 ;
if (fileattr(ready) > 0) C=10;
if (fileattr(tree) > 0) D=10;
 _entry_enum = 0;
 while (A+B+C+D+E+F+G+H > 0)
{
	if (A > 0)
   {
   	A=A-1;
   	disp();
      dial("3", 1);
      if (_entry_enum > 0)
      {
      	AZ=10-A;
      	A = 0;
      }
      _entry_enum = 0;
      while (carrier())
      	terminal();
	}
	
	if (B > 0)
   {
   	B=B-1;
   	disp();
      dial("4", 1);
      if (_entry_enum > 0)
      {
      	BZ=10-B;
      	B = 0;
      }
      _entry_enum = 0;
      while (carrier())
      	terminal();
	}
	if (C > 0)
   {
   	C=C-1;
      disp();
      dial("5", 1);
      if (_entry_enum > 0) 
      {
      	CZ=10-C;
      	C = 0;
      }
      _entry_enum = 0;
      while (carrier())
      	terminal();
	}
	if (D > 0)
   {
   	D=D-1;
      disp();
      dial("6", 1);
      if (_entry_enum > 0)
      {
      	DZ=10-D;
      	D = 0;
      }
      _entry_enum = 0;
      while (carrier())
      	terminal();
	}
	if (E > 0)
   {
   	E=E-1;
      disp();
      dial("7", 1);
      if (_entry_enum > 0) 
      {
      	EZ=10-E;
      	E = 0;
      	F = 0;
      	G = 0;
      	H = 0;
      }
      _entry_enum = 0;
      while (carrier())
      	terminal();
	}
	if (F > 0)
   {
   	F=F-1;
		disp();
      dial("8", 1);
      if (_entry_enum > 0) 
      {
      	EZ=10-F;
      	E = 0;
      	F = 0;
      	G = 0;
      	H = 0;
      }
      _entry_enum = 0;
      while (carrier())
      	terminal();
	}
	if (G > 0)
   {
   	G=G-1;
		disp();
      dial("9", 1);
      if (_entry_enum > 0) 
      {
      	EZ=10-G;
      	E = 0;
      	F = 0;
      	G = 0;
      	H = 0;
      }
      _entry_enum = 0;
      while (carrier())
      	terminal();
	}
	if (H > 0)
   {
   	H=H-1;
		disp();
      dial("10", 1);
      if (_entry_enum > 0) 
      {
      	EZ=10-H;
      	E = 0;
      	F = 0;
      	G = 0;
      	H = 0;
      }
      _entry_enum = 0;
      while (carrier())
      	terminal();
	}
      
}
usagelog("*CLOSE*");
exittelix(0, 1);
}
disp()
{
str num[4];
clear_scr();
if (A ==0) 
{
	pstraxy("ISSC Complete.        ",0,2,12);
	itos(AZ,num);
	pstra(num,14);
	pstra(" attempts.",15);
}
else 
{
	pstraxy("No ISSC Connect.      ",0,2,12);
	itos(A,num);
	pstra(num,14);
	pstra(" tries remaining.",15);
}
if (B ==0)
{
	pstraxy("Heartbeat Complete.   ",0,3,12);
	itos(BZ,num);
	pstra(num,14);
	pstra(" attempts.",15);
}
else 
{
	pstraxy("No Heartbeat Connect. ",0,3,12);
	itos(B,num);
	pstra(num,14);
	pstra(" tries remaining.",15);
}
if (C ==0)
{
	pstraxy("Ready/Det complete.   ",0,4,12);
	itos(CZ,num);
	pstra(num,14);
	pstra(" attempts.",15);
}
else 
{
	pstraxy("No Ready/Det Connect. ",0,4,12);
	itos(C,num);
	pstra(num,14);
	pstra(" tries remaining.",15);
}
if (D ==0)
{
	pstraxy("Treehouse complete.   ",0,5,12);
	itos(DZ,num);
	pstra(num,14);
	pstra(" attempts.",15);
}
else 
{
	pstraxy("No Treehouse Connect. ",0,5,12);
	itos(D,num);
	pstra(num,14);
	pstra(" tries remaining.",15);
}
if (E == 0 | F == 0 | G == 0)
{
	pstraxy("BitByters complete.   ",0,6,12);
	itos(EZ,num);
	pstra(num,14);
	pstra(" attempts.",15);
}
else 
{
	pstraxy("No Bitbyters Connect. ",0,6,12);
	itos(E,num);
	pstra(num,14);
	pstra(" tries remaining.",15);
}
prints("^M");
delay_scr(PAUSE);
}
=== end SELECT.SLT ===
Salut!
Rick
--- 
---------------
* Origin: The Warlock's Cave (1:163/215.39)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.