home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1995 November
/
PCWK1195.iso
/
esker
/
emul.1
/
EMUL.ARC
/
RCOPY.MAC
< prev
next >
Wrap
Text File
|
1994-07-27
|
1KB
|
69 lines
# Characters sent by Host computer not displayed
Title "File Transfert"
# Start
Label BEGIN
# Read password
ShowMessage
ReadPasswd "Enter your password : " PASSWD
HideMessage
# Make connection
Repeat 3
# Send carriage-return character
Repeat 5
SendAndReceive 5 "\n" "ogin"
Pause 1
IfNoError break
end
IfError NOCONNECTION
# Send login
SendAndReceive 9 "root\n" "assword" "# "
IfError continue
IfEqual "# " break
SendAndReceive 9 "%PASSWD\n" "# " "ogin:" "ERM"
IfError continue
IfEqual "# " break
# Return to start of program if login incorrect
IfEqual "ogin:" BEGIN
# Set the TERM variable if necessery
SendAndReceive 9 "\n" "# "
IfError continue
IfEqual "# " break
end
# Start application
Set FILE "VT220.*"
RcopyPut c:\\TUNEMUL\\VT220.* /tmp
IfError TRANSFERTERROR
Set FILE "ANSI.SEQ"
Pause 15
RcopyPut c:\\TUNEMUL\\ANSI.SEQ /tmp
IfError TRANSFERTERROR
# Transfert done
ShowMessage
ClearMessage
Echo "Transfert Done"
Sleep 3
# Exit from the emulator
Exit
#Transfert error
Label TRANSFERTERROR
ShowMessage
Echo "Error Transfering %FILE"
ReadVar "Press Return to quit" ANSWER
# Exit the emulator
exit
# No login
Label NOCONNECTION
ShowMessage
Echo "Communication failed"
ReadVar "Press Return to quit" ANSWER
# Exit the emulator
exit