# # XNet login.cmd script for Trumpet Winsock 2.0B # modified by David Efflandt efflandt@xnet.com # #trace on # # set up some strings for dialling up # if ![load $number] if [query $number "Enter your dial up phone number"] save $number end end if ![load $username] if [username "Enter your login username"] save $username end end if ![load $password] if [password "Enter your login password"] save $password end end $modemsetup = "&c1&k3" %attempts = 10 # # #---------------------------------------------------------- # # initialize modem # output "atz"\13 if ! [input 10 OK\n] display "Modem is not responding"\n abort end # # setup our modem commands # output "at"$modemsetup\13 input 10 OK\n # # send phone number # %n = 0 repeat if %n = %attempts display "Too many dial attempts"\n abort end output "atdt"$number\13 %ok = [input 60 CONNECT] %n = %n + 1 until %ok input 10 \n # now we are connected. # # wait till it's safe to send because some modem's hang up # if you transmit during the connection phase # wait 30 dcd # # wait for the username prompt # input 30 ogin: # username Enter your SLIP/PPP login: # output \u\13 output $username\13 # # and the password # input 30 ssword: # password Enter your SLIP/PPP password: # output \p\13 output $password\13 # # we are now connected, logged in and in slip mode. # input 30 enabled display \nConnected...\n # # now we are finished. #