-- SUPTEL.TWK - Version 2.0 du 30/01/1989 -- Script de Connexion à un BBS PC-BOARD sous TWinTalk -- Jean Michel COHEN {$l-} -- liste {$d-} -- références croisées {$v-} -- fenêtre d'execution visible Program SUPTEL; Const MAXTIM = 30; NOTFOUND = 'Chaîne Non Trouvée...'; TITLE = 'Serveurs BBS'; NOCARRIER = 'Pas de Porteuse'; Type String = Array[1..40] of Char; Var Compo, Essai, n:Integer; s:string; Procedure WaitFor(str:String); Var Times, Result:integer; Begin InitTake(str, 1); Times := 0; Repeat Times := Succ(Times); Result := Taken; Wait(1); Until (Result # 0) or (Times > MAXTIM); if Times > MAXTIM then Begin WriteLn(NOTFOUND); Exit End End; Procedure Suptel; Begin WaitFor('change?'); Send('1', RETURN); Wait(1); Send('n q', RETURN); WaitFor('name?'); Send('prenom nom mot_de_passe', RETURN); WaitFor('yes?'); Send('n', RETURN); WaitFor('Command?'); Send('Open 1', RETURN); End; Begin Compo := 1; Disconnect; While Not Connected Do Begin n := 99; Disconnect; Cls; WriteLn('#', Compo); WriteLn(TITLE); WriteLn; WriteLn('0) Quitter'); WriteLn('1) Suptel Pro'); WriteLn('2) Suptel bis'); WriteLn('3) Suptel Ter'); Move(450, 50, 12, 17); Show; While(n>3) or (n<0) do ReadLn(n); If n=0 Then Exit(1); Hide; Connect; Wait(1); Compo := Succ(Compo); Case n of 1: Dial('48991200'); 2: Dial('48980300'); 3: Dial('48994300'); End; Essai := 0; Repeat Essai := Succ(Essai); Wait(3); Until Connected or (Essai > 10); End; (* While *) Case n of 1,2,3: Suptel; End; Exit(1); End.