;************************************************************************ ;* ;* telnet to iii server, then initialize backup tape ;* ;* This program does not give any, explicit or implicit, warranty. ;* The author is not responsible for any inadvertence as a result of ;* using this program. ;* ;* Please make necessary changes in areas marked by **Customize: **. ;* Please make sure all the inputs match the correct input series and ;* sequence required for your Initialization process whereever appropriate. ;* The extention of this script file must be ".ttl". ;* ;* usage: ttermpro /m=iii_backup_init_11 ;* usage: ttermpro /m=iii_backup_init_11 /i ;* (The above two both work. When running with the second, the session ;* window does not show on your desktop, instead it shrinks into an ;* icon in the Taskbar at the bottom of the screen.) ;* (If you use Windows "Scheduled Tasks" to launch this scropt, in the ;* "Run:" box, fill in ;* "C:\Program Files\TTERMPRO\ttermpro.exe" /m=iii_backup_init ;* Please modify the above statement to reflect where you install the ;* Tera Term software.) ;* ;* Phil Huang, Sonoma State University, Sept. 2007 ;* ;************************************************************************* ; **Customize: use the ip or domain name of your server** connect '130.157.51.249' ; If unable to make a connection (wrong ip, server too busy, etc.), the ; system variable "result" gets 1. if result = 1 goto ConnectionFailure ; login wait 'login:' ; **Customize: use your login username** sendln 'MyUserName' wait 'Password:' ; **Customize: use your password** sendln 'MyPassword' ; login complete wait 'M,A,I,Q)' send 'A' wait 'U,A,O,Q)' send 'B' ; secondary login ; **Customize: use your second login username** sendln 'My2rdName' ; **Customize: use your second password** sendln 'My2ndPassword' wait 'U,T,Q)' send 'U' wait 'E,V,Q)' send 'I' wait 'D,F,Q)' send 'F' wait 'Choose one (I,Q)' send 'I' ; time and date stamp, in the format "HH:MM:SS, YYYY-MM-DD" gettime Stamp getdate DateStr strconcat Stamp ', ' strconcat Stamp DateStr sendln Stamp wait 'tape NOW? (y/n)' send 'Y' wait 'initialization is complete' 'rror' ; If 'initialization is complete' matched, the system variable "result" gets 1. ; If 'rror' matched, variable "result" gets 2. if result=2 goto Errors ; things go OK. End the seesion. send 'Q' send 'Q' send 'Q' send 'Q' send 'Q' ; Give status indication with time stamp in a pop-out window MessageOk = 'Initialization Ok. ' strconcat MessageOk Stamp messagebox MessageOk 'Initialization Completed' end :Errors ; Give an error message with time stamp in a pop-out window MessageError = 'Error. Check the tape or call III. ' strconcat MessageError Stamp messagebox MessageError 'Error' end :ConnectionFailure ; Give an error message in a pop-out window MessageError = 'Unable to connect to the server' messagebox MessageError 'Connection Failure' end