#define _RUSTY "10.30.248.41"
#define _LOGONID $USERID
#define _PW $PASSWORD
proc main
when USEREXIT call ExitProgram ; if user exits via esc, close etc.
PWNewTitleProc()
transmit "^m"
waitfor "login:" 60
if SUCCESS
transmit _LOGONID
transmit "^m"
waitfor "password" 5
if SUCCESS
transmit _PW
transmit "^m"
else
errormsg "Failed to login to Cygwin"
exit
endif
else
errormsg "Failed to connect to Cygwin"
exit
endif
waitquiet 1
strfmt s0 "ssh %s^m" _RUSTY
transmit s0
waitfor "password:" 5
if SUCCESS
transmit "password"
transmit "^m"
waitfor "cacman]$" 5
if FAILURE
errormsg "Failed to login to Rusty"
exit
endif
else
errormsg "Failed to connect to Rusty"
exit
endif
endproc
;///////////////////////////////////////////////////////////
; EXITPROGRAM
;
; This procedure updates the hint counter and STARTUP.WAX information upon
; exiting the script.
;
; Called by: when USEREXIT
;///////////////////////////////////////////////////////////
proc ExitProgram
termmsg "`r`n"
termmsg "`r`n"
termmsg "*****************************************`r`n"
termmsg "**** User exited script.`r`n"
termmsg "*****************************************`r`n"
termmsg "`r`n"
termmsg "`r`n"
statclear
exit
endproc
;///////////////////////////////////////////////////////////
; Display the the name of the Connection Directory entry that
; established the current connection in the title bar for Procomm Plus.
;///////////////////////////////////////////////////////////
proc PWNewTitleProc
string NewTitleStr ; New title for Procomm Plus.
strfmt NewTitleStr "Procomm Plus - %s - %s" $DIALCONNECT,$IPADDRESS
pwtitlebar NewTitleStr PERMANENT ; Change Procomm Plus's title.
endproc