I am using the following script to log into a series of systems consecutively.
proc main
string sLine, sNum, sRmalogin, sRmapassw, sMtclpassw, sCaplog
if fopen 0 "file.txt" READ TEXT
while not feof 0
fgets 0 sLine
strtok sNum sLine "`t" 1
strtok sRmalogin sLine "`t" 1
strtok sRmapassw sLine "`t" 1
strtok sMtclpassw sLine "`t" 1
strtok sCaplog sLine "`t" 1
clear
Set Capture File sCaplog
Capture On
dialnumber DATA sNum
while $DIAlING
yield
endwhile
if $CARRIER
;******************
;login sequence
;******************
waitfor "eRMA login: " FOREVER
transmit sRmalogin
; etc...
; list of commands
endif
Capture off
endwhile
endif
fclose 0
endproc
In some cases, my modem fails to connect to the remote modem but then, the script just hangs. I set the numbers of retries to 2 and after 2 unsuccessful attempts, the script does not dial the next number (as I would like it to do).
Any idea how I could make the script resume after a connection failre ?
Thanks
proc main
string sLine, sNum, sRmalogin, sRmapassw, sMtclpassw, sCaplog
if fopen 0 "file.txt" READ TEXT
while not feof 0
fgets 0 sLine
strtok sNum sLine "`t" 1
strtok sRmalogin sLine "`t" 1
strtok sRmapassw sLine "`t" 1
strtok sMtclpassw sLine "`t" 1
strtok sCaplog sLine "`t" 1
clear
Set Capture File sCaplog
Capture On
dialnumber DATA sNum
while $DIAlING
yield
endwhile
if $CARRIER
;******************
;login sequence
;******************
waitfor "eRMA login: " FOREVER
transmit sRmalogin
; etc...
; list of commands
endif
Capture off
endwhile
endif
fclose 0
endproc
In some cases, my modem fails to connect to the remote modem but then, the script just hangs. I set the numbers of retries to 2 and after 2 unsuccessful attempts, the script does not dial the next number (as I would like it to do).
Any idea how I could make the script resume after a connection failre ?
Thanks