# PPP script # ~~~~~~~~~~ # This is a script called "login.cmd" for Trumpet WinSock 2.0e to use PPP # # # # trace on # # initialize modem # output ath\n sleep 2 output at&f\n sleep 1 input 10 OK\n # # Be certain to add long-distance, or PABX dial-out prefixes #modify the line below if you need phone number strings other than 12 %numlen = 8 #note that the full 8 digits must be included # the modem will ignore the dashes and blanks # add more numbers if you want, just increment the variable names $phone1 = "30029000" $phone2 = "30029225" $phone3 = "30029128" $phone4 = "30029183" $phone5 = "30029125" # if you add more phone numbers, add the variable names below with a plus sign before each $phonenums = $phone1 + $phone2 + $phone3 + $phone4 + $phone5 # if you increase the phone number quantity, change the value below %numbers = 5 # change the string below if your modem uses some other string in its connect message # change atdt after outputecho to atm0dt to disable the dial tone. $connectstring = "CONNECT" %cycle = 0 %attempts = 0 repeat %attempts = %attempts + 1 if %cycle = %numbers %cycle = 0 end %startloc = %cycle * %numlen + 1 %cycle = %cycle + 1 $dialnum = copy($phonenums,%startloc,%numlen) outputecho 60 "atm0dt"$dialnum\13 read 60 $result %ok = pos($connectstring,$result) sleep 2 until %ok > 0 | %attempts = 25 # abort if no CONNECT if !%ok display Your system is REALLY busy - try again later abort bye end #now you can put in your actual login procedure #replace MYLOG with your login name # input 60 login: sleep 1 output MYLOG\n #replace MYPASS with your password # input 60 assword: sleep 1 output MYPASS\r input 30 annex: output ppp\n display \n display Connected.\n display You can now start your Winsock utilities. online # if you want to start something like eudora e.g. (remove #) # exec "c:\trumpwin\eudora\weudora.exe" # normally this logs off automatically after I close Netscape or after mail is checked. # But you should also choose "auto-login & logout on demand" in >