/* Name PPP DialUp 1 Interface ppp InterfaceConfig "ATH LOG=10 TIMEOUT=3 MAXCONFIG=5 EXERCISE=840 DIALWINDOW=KCON:0/11/648/221/PPPdial/AUTO/CLOSE" NeedSerial 1 IPDynamic 1 IPAddr 0.0.0.0 DestIP Gateway Netmask NSDynamic 0 UseBootP 0 MTU 1500 Phone 2842121 */ /* * $VER: Serial_PPP 1.1 (09.03.97) * $Id: SeriaL PPP Dialer,v 1.1 1997/03/09 DaddyB@@ze $ * * PROGRAM DESRIPTION * * More advanced serial login script for Amitcp 4.3 * Relies on scripts in ssrx so that it is as simple in here as possible. * Don't forget to configure your login prompts below! * * AUTHOR(S) * * Sylvain Bourcier - 1:167/151.66@fidonet * 40:600/151.66@amiganet * Booze@Generation.net */ OPTIONS RESULTS OPTIONS FAILAT 21 SIGNAL ON BREAK_C SIGNAL ON SYNTAX SIGNAL ON FAILURE SIGNAL ON ERROR /* LOGIN PARAMETERS, Adjust to your needs. * */ UPROMPT="username:" /* Username login prompt, leave blank for manual login */ UNAME ="myname" /* The username you use for this provider */ PPROMPT="password#" /* Password login prompt */ PASSWD ="mypasswd" /* Your password */ LPROMPT="ection:" /* Login mode prompt, leave blank if none */ LMODE ="1" /* Login mode to select PPP */ Set InterCharDelay 0 /* Delay in milliseconds between chars */ ShowConsole RETRY: DBPrint 'CommandState.ssrx' Call CommandState cRESULT=RESULT DBPrint 'CommandState.ssrx returned:' cRESULT If cRESULT>1 Then Do Say '+++ Amitcp Login: CommandState.ssrx error, login aborted.' Exit 20 End If cRESULT=0 Then Do DBPrint 'Dial.ssrx' Call Dial dRESULT=RESULT DBPrint 'Dial.ssrx returned:' dRESULT If dRESULT>1 Then Do Say '+++ Amitcp Login: Dial.ssrx error, login aborted.' Exit 20 End If dRESULT~=0 Then Do /* TRY TO GET REXXREQTOOLS LOADED */ If ~Show('L',"rexxreqtools.library") Then CALL AddLib('rexxreqtools.library',0,-30,0) If ~Show('L',"rexxreqtools.library") Then Exit 10 Else Do LF='0a'x ReqT = rtEZRequest("Amitcp dial script failed"||LF||"to connect to host,"||LF||LF||"Try Again?","ReTr_y|Ca_ncel","Amitcp","RT_REQPOS=REQPOS_CENTERSCR RT_WAITPOINTER=TRUE RTEZ_FLAGS=EZREQF_CENTERTEXT") If ReqT="" | ReqT=0 | REQT=REQT Then Exit 10 Signal RETRY /* 'ManualConsole' */ End End If UPROMPT="" Then Do 'Status "Please log in..."' 'ManualConsole' End Else Do Status 'Loging you in...' WaitFor UPROMPT SendLn UNAME WaitFor PPROMPT SendLn PASSWD If LPROMPT~="" Then Do WaitFor LPROMPT SendLn LMODE End End End Else DBPrint 'CommandState returncode suggests modem already online, dial.ssrx skipped.' Say '' Say 'Starting-up device...' Exit 0 /*----------------------------------------------------------- ERROR HANDLERS -----------------------------------------------------------*/ BREAK_C: Say "+++ Amitcp Login: Break!" Exit 10 SYNTAX: Say "+++ Amitcp Login: Syntax Error ("||RC||") at line "||SIGL||": "||errortext(RC) Exit 20 FAILURE: Say "+++ Amitcp Login: FAILURE! On line "||SIGL Exit 20 ERROR: x=RC Say "+++ Amitcp Login: Command on line "||SIGL||" returned "||x||": "||SerScript.LASTERROR If x=1 Then x=10 Exit x /* EOF * */