BELOW IS A SCRIPT TO LOGON USING TELNET, IF IDLE FOR A CERTIAN TIME IT WILL DISCONNECT. OR IF USER TYPES "BYE" IT WILL LOG OFF & DISCONNECT, WORKS GREAT. BUT, I WOULD LIKE TO ALLOW THE USER IF DISCONNECTED AND PROCOMM STILL ON TO BE ABLE TO HIT ESC KEY AND EXIT PROCOMM !!!!! HOW CAN I MAKE THIS WORK, SINCE I ALREADY HAVE A WHEN CONDITION ????
THANK YOU,
proc main
integer iStatus
string sConnection
when target 0 "BYE" call pexit
set aspect control on
when quiet 1200 call closedown
sConnection="CSD"
dial TELNET sConnection
iStatus=$CARRIER
while (iStatus==1)
yield
iStatus=$CARRIER
endwhile
pause 1
switch iStatus
case 3
;Connection attempt failed, perform error handling
endcase
endswitch
endproc
proc closedown
disconnect
if waitfor "Login:"
main()
else
waitquiet 1200 forever
pwexit
endif
endproc
proc pexit
pause 1
usermsg "GOOD BYE !!!!"
pause 1
disconnect
pause 3
pwexit
endproc
proc closepc
integer iKey
keyget iKey
if iKey==27
usermsg "GOOD BYE !!!!"
pause 2
pwexit
endif
endproc
THANK YOU,
proc main
integer iStatus
string sConnection
when target 0 "BYE" call pexit
set aspect control on
when quiet 1200 call closedown
sConnection="CSD"
dial TELNET sConnection
iStatus=$CARRIER
while (iStatus==1)
yield
iStatus=$CARRIER
endwhile
pause 1
switch iStatus
case 3
;Connection attempt failed, perform error handling
endcase
endswitch
endproc
proc closedown
disconnect
if waitfor "Login:"
main()
else
waitquiet 1200 forever
pwexit
endif
endproc
proc pexit
pause 1
usermsg "GOOD BYE !!!!"
pause 1
disconnect
pause 3
pwexit
endproc
proc closepc
integer iKey
keyget iKey
if iKey==27
usermsg "GOOD BYE !!!!"
pause 2
pwexit
endif
endproc