Category : Communication (modem) tools and utilities
Archive   : CA29-3.ZIP
Filename : LEARN.CMD

 
Output of file : LEARN.CMD contained in archive : CA29-3.ZIP
SET TTHR OFF
S19="Learn ver 1.0 "
CURS N91,N92
LEGE S19
SUBD S18
DLDI S17
SSIZ N99
SAVE 0,0,N99-2,79
ON ESCA GOSU ESCAPE
SET FLAG(1) OFF
IF STRCMP "_PRIN" "ON"
SET FLAG(1) ON
PRINTER OFF
ENDI
Get_Outp:
S1="Enter a file name to be output:"
GOSU Ask_File
IF NOT SUCCESS EXIT
S16=S0
IF ISFILE S16
S0=S16*" already exists. Overwrite it? Y/N (cr=no)"
GOSU Ask_YN
IF NOT SUCCESS GOTO Get_Output
ENDI
FOPENO S16 TEXT
IF NOT SUCCESS
S0="Error opening output file: "*S16
GOSU Error
GOTO Get_outp
ENDI
GOSU Initial
SET CHAT OFF
GOTO START
Escape:
SET FLAG(0) ON
RETU
End_Lear:
DWIN CLEAR
IF FLAG(2) and STRCMP "_LOGG" "ON "
WRIT "LOG CLOSE!"
LOG CLOS
ENDI
WRIT "^Z" 2
FCLOSEO
SET DLDI S17
CHDI S18
REST
LOCA N91,N92
IF FLAG(1)
PRINTER ON
ELSE
PRINTER OFF
ENDI
RETU
Exit:
S0="Do you wish to terminate LEARN? Enter Y to terminate."
GOSU Ask_YN
IF SUCCESS
GOSU End_Lear
EXIT
ENDI
SET FLAG(0) OFF
RETU
Start:
N90=0
S11=""
S12=""
SET FLAG(0) OFF
SET FLAG(9) OFF
SET FLAG(8) OFF
GOSU Screen
LOCA 1,1
DWIN N99-12,2 N99-12 77
GOTO Main
Output:
WRIT S0
WRIT "!"
Main:
LOCA N93,N94
IF FLAG(0) GOSUB Exit
IF NOT HITKEY
IF RECEIVE GOSUB Receive
GOTO Main
ENDI
KEYG S1
LENG S1 N0
SWIT N0
CASE 1
GOTO ASCII
ENDC
CASE 2
GOTO CONTROL
ENDC
CASE 4
GOTO FUNCTION
ENDC
ENDS
GOTO Main
KbdDisp:
IF GT N90 0
S0=S10(0:n90-1)
PRES S0
ATSA N99-12,2 (Default) S0*" "
ENDI
N94=N90+2
GOTO Main
Receive:
DWIN 1,0,(N99-14),79
IF FLAG(1) PRINTER ON
LOCA N95,N96
S12=S11
RGET S11 80 1
CURS N95,N96
IF FLAG(1) PRINTER OFF
DWIN N99-12,2 N99-12,77
RETU
ASCII:
IF FLAG(8)
PRES S1
TRAN S1
GOTO Main
ENDI
IF GT (N90+2) 60
SOUN 100,100
GOTO Main
ENDI
S10(N90:N90)=S1
INC N90
IF STRCMP S1 "!" or STRCMP S1 "^"
S10(N90:N90)=S1
INC N90
ENDI
IF FLAG(9) GOTO Transmit
GOTO KbdDisp
Control:
S0="0x"*S1
N0=S0
N0=N0+64
S0="^"
ITOC N0 S0(1:1)
IF FLAG(8)
TRAN S0
GOTO Main
ENDI
IF (NOT FLAG(9)) and STRCMP S1 "08"
GOTO Backspac
ENDI
IF STRCMP S1 "0D"
GOTO RETURN
ENDI
IF GT (N90+2) 60
SOUN 100,100
GOTO Main
ENDI
S10(N90:N90+1)=S0(0:1)
N90=N90+2
IF FLAG(9) GOTO Transmit
GOTO KbdDisp
Backspac:
IF ZERO N90
GOTO KbdDisp
ENDI
DEC N90
IF STRCMP S10(N90-1:N90-1) "^" or STRCMP S10(N90-1:N90) "!!"
DEC N90
ENDI
GOTO KbdDisp
Return:
IF NOT ZERO N90
S10=S10(0:N90-1)*"!"
ELSE
S10="!"
ENDI
N90=N90+1
Transmit:
GOSU Waitfor
WRIT "TRANSMIT `""
IF STRCMP S10(N90-1:N90-1) "!!"
WRIT S10 N90-1
WRIT "!!" 2
ELSE
WRIT S10 N90
ENDI
WRIT "`"!"
TRAN S10(0:N90-1)
N90=0
CLEA (default)
N94=2
GOTO Main
Waitfor:
LJ S11
S11=S11&""
LENG S11 N1
IF NOT ZERO N1
S0=S11
GOTO EmitWait
ENDI
LJ S12
S12=S12&""
LENG S12 N1
IF NOT ZERO N1
S0=S12
GOTO EmitWait
ENDI
WRIT ";!"
WRIT "; WAITFOR may be needed here!"
WRIT ";!"
RETU
EmitWait:
PRES S0
LENG S0 N1
WRIT "WAITFOR `""
WRIT S0
WRIT "`"!"
WRIT ";*IF NOT WAITFOR GOTO ...!"
S11=""
S12=""
RETU
Function:
IF FLAG(8) and NOT STRCMP S1 "4000"
SOUN 100,100
GOTO Main
ENDI
SWIT S1
CASE "2E00"
GOTO Clear
ENDC
CASE "1200"
GOTO Echo
ENDC
CASE "2C00"
GOTO Mask
ENDC
CASE "2600"
GOTO ScrSize
ENDC
CASE "2300"
GOTO Hangup
ENDC
CASE "2000"
GOTO Dial
ENDC
CASE "1900"
GOTO Parms
ENDC
CASE "3100"
GOTO Encrypt
ENDC
CASE "2200"
GOTO Blnkln
ENDC
CASE "1000"
GOTO CRLF
ENDC
CASE "7500"
GOTO Break
ENDC
CASE "7200"
GOTO Printer
ENDC
CASE "4900"
GOTO Upload
ENDC
CASE "5100"
GOTO Download
ENDC
CASE "7800"
GOTO Alt_1
ENDC
CASE "7900"
GOTO Alt_2
ENDC
CASE "7A00"
GOTO Alt_3
ENDC
CASE "7B00"
GOTO Alt_4
ENDC
CASE "7C00"
GOTO Alt_5
ENDC
CASE "7D00"
GOTO Alt_6
ENDC
CASE "7E00"
GOTO Alt_7
ENDC
CASE "7F00"
GOTO Alt_8
ENDC
CASE "8000"
GOTO Alt_9
ENDC
CASE "8100"
GOTO Alt_0
ENDC
CASE "3B00"
GOTO Accessry
ENDC
CASE "3C00"
GOTO Script
ENDC
CASE "3D00"
GOTO Chdir
ENDC
CASE "3E00"
GOTO DlDir
ENDC
CASE "3F00"
GOTO LineChar
ENDC
CASE "4000"
GOTO Hold
ENDC
CASE "4100"
GOTO Log
ENDC
CASE "4300"
GOTO LogHold
ENDC
CASE "4400"
GOSU Help
ENDC
CASE "7100"
GOTO Shell
ENDC
DEFA
SOUN 100,100
ENDC
ENDS
GOTO Main
SHELL:
S16="_OFILE"
FCLOSEO
DWIN Clear
SHEL
DWIN N99-12,2 N99-12 77
LEGE S19
FOPENO S16 TEXT APPEND
GOTO Main
Clear:
DWIN 1,0,(N99-14),79
CLEA (default)
CURS N95,N96
DWIN N99-12,2 N99-12,77
LOCA N93,N94
S0="CLEAR"
GOTO Output
Echo:
S0="SET DUPLEX HALF"
IF STRCMP "_DUPL" "HALF"
S0="SET DUPLEX FULL"
ENDI
PERF S0
GOSU StatusLi
GOTO Output
Mask:
S0="SET MASK ON"
IF STRCMP "_MASK" "ON "
S0="SET MASK OFF"
ENDI
PERF S0
GOSU StatusLi
GOTO Output
ScrSize:
S0="SET 43"
IF GT "_SSIZ" 25
S0="SET 25"
ENDI
PERF S0
SSIZ N99
GOSU Screen
GOTO Output
Alt_0:
S0="MACRO 0"
GOTO Send_Mac
Alt_1:
S0="MACRO 1"
GOTO Send_Mac
Alt_2:
S0="MACRO 2"
GOTO Send_Mac
Alt_3:
S0="MACRO 3"
GOTO Send_Mac
Alt_4:
S0="MACRO 4"
GOTO Send_Mac
Alt_5:
S0="MACRO 5"
GOTO Send_Mac
Alt_6:
S0="MACRO 6"
GOTO Send_Mac
Alt_7:
S0="MACRO 7"
GOTO Send_Mac
Alt_8:
S0="MACRO 8"
GOTO Send_Mac
Alt_9:
S0="MACRO 9"
Send_Mac:
PERF S0
GOTO Output
Hangup:
GOSU Waitfor
S0="HANGUP"
PERF S0
GOTO Output
Break:
GOSU Waitfor
S0="BREAK"
PERF S0
GOTO Output
Printer:
IF FLAG(1)
S0="PRINTER OFF"
SET FLAG(1) OFF
ELSE
S0="PRINTER ON"
SET FLAG(1) ON
ENDI
WRIT S0*"!"
GOSU StatusLi
GOTO Main
LineChar:
IF FLAG(9)
SET FLAG(9) OFF
ELSE
SET FLAG(9) ON
ENDI
GOSU StatusLi
GOTO Main
Hold:
IF FLAG(8)
SET FLAG(8) OFF
ELSE
SET FLAG(8) ON
ENDI
GOSU StatusLi
GOTO Main
UpLoad:
GOSU Ask_Meth
S1="/NONAME/"
SWIT S0
CASE "_NULL"
GOTO Main
ENDC
CASE "0"
GOSU Ask_Name
S0="SENDFILE ZMODEM S1"
ENDC
CASE "1"
GOSU Ask_Name
S0="SENDFILE WXMODEM S1"
ENDC
CASE "2"
GOSU Ask_Name
S0="SENDFILE XMODEM S1"
ENDC
CASE "3"
GOSU Ask_Name
S0="SENDFILE ASCII S1"
ENDC
CASE "4"
GOSU Ask_Name
S0="SENDFILE YMODEM S1"
ENDC
CASE "5"
S0="SENDFILE CISB"
ENDC
CASE "6"
S0="SENDFILE QuickB"
ENDC
CASE "7"
GOSU Ask_Name
S0="SENDFILE KERMIT S1"
ENDC
CASE "8"
GOSU Ask_Name
S0="SENDFILE BYMODEM S1"
ENDC
CASE "9"
GOSU Ask_Name
S0="SENDFILE BYMOG S1"
ENDC
DEFA
SOUN 100,100
GOTO Main
ENDC
ENDS
Transfer:
IF NULL S1 GOTO Main
PERF S0
IF NOT STRCMP S1 "/NONAME/"
WRIT "; File transfer!"
WRIT "MESS `"Enter the file name: `"!"
WRIT "GET S1 60!"
ENDI
GOTO Output
DownLoad:
GOSU Ask_Meth
S1="/NONAME/"
SWIT S0
CASE "_NULL"
GOTO Main
ENDC
CASE "0"
S0="GETFILE ZMODEM S1"
ENDC
CASE "1"
GOSU Ask_Name
S0="GETFILE WXMODEM S1"
ENDC
CASE "2"
GOSU Ask_Name
S0="GETFILE XMODEM S1"
ENDC
CASE "3"
GOSU Ask_Name
S0="GETFILE ASCII S1"
ENDC
CASE "4"
GOSU Ask_Name
S0="GETFILE YMODEM S1"
ENDC
CASE "5"
S0="GETFILE CISB"
ENDC
CASE "6"
S0="GETFILE QuickB"
ENDC
CASE "7"
S0="GETFILE KERMIT"
ENDC
CASE "8"
S0="GETFILE BYMODEM"
ENDC
CASE "9"
S0="GETFILE BYMOG"
ENDC
DEFA
SOUN 100,100
GOTO Main
ENDC
ENDS
GOTO Transfer
Ask_Meth:
WOPE 2 20 14 60 (contrast) ASK_ESC
ATSA 2 22 (contrast) " Learn UpLoad/Download "
ATSA 3 22 (contrast) " 1) Windowed XMODEM"
ATSA 4 22 (contrast) " 2) CRC/Checksum XMODEM"
ATSA 5 22 (contrast) " 3) ASCII transfer "
ATSA 6 22 (contrast) " 4) YMODEM/XMODEM-1K"
ATSA 7 22 (contrast) " 5) CIS-B "
ATSA 8 22 (contrast) " 6) CIS Quick-B "
ATSA 9 22 (contrast) " 7) Kermit "
ATSA 10 22 (contrast) " 8) Batch YMODEM "
ATSA 11 22 (contrast) " 9) Batch YMODEM-G "
ATSA 11 22 (contrast) " 0) ZMODEM "
ATSA 12 20 (contrast) "ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"
ATSA 13 22 (contrast) "Enter method #:"
ATSA 14 30 (contrast) " Press ESC to cancel "
ATGE 13 48 (contrast) 1 S0
WCLO
RETU
Ask_Name:
WOPE 10 10 13 70 (contrast) NAMEESC
ATSA 10 12 (contrast) " Learn Up/Down Filename "
ATSA 11 12 (contrast) "Enter a file name to be transferred:"
ATSA 13 30 (contrast) " Press ESC to cancel "
ATGE 12 12 (contrast) 54 S1
WCLO
LJ S1
S1=S1&""
RETU
NAMEESC:
S1=""
RETU
Dial:
GOSU Ask_Dial
IF NOT SUCCESS or NULL S2 GOTO Main
IF FIND S2 "m"
GOSU Ask_numb
IF FAILED or NULL S1 GOTO Main
MDIA S1
ELSE
DIAL S2
ENDI
IF FAILED GOTO Main
WRIT "; Dialing!"
IF FIND S2 "m"
WRIT "MDIAL `""
WRIT S1
WRIT "`"!"
WRIT "IF FAILED EXIT!"
ELSE
WRIT "IF NOT LINKED!"
WRIT " DIAL `""
WRIT S2
WRIT "`"!"
WRIT " IF FAILED EXIT!"
WRIT " ENDIF!"
ENDI
GOTO Main
Ask_Numb:
WOPE 10 10 13 70 (contrast) NAMEESC
ATSA 10 12 (contrast) " Learn Manual Dial "
ATSA 11 12 (contrast) "Enter the number to dial:"
ATSA 13 30 (contrast) " Press ESC to cancel "
ATGE 12 12 (contrast) 14 S1
WCLO
LJ S1
S1=S1&""
RETU
Ask_Dial:
N0=0
WOPE 2 20 15 60 (contrast) ASK_ESC
ATSA 2 22 (contrast) " Learn Dial "
ATSA 13 20 (contrast) "ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"
ATSA 14 22 (contrast) "Entry# (or m):"
ATSA 15 30 (contrast) " Press ESC to cancel "
Dial_Loo:
SCRO 0,3,22 12,58 (contrast)
FOR N1=1,10
N4=N0+N1
DIRE S0 N4
ATSA (2+N1) 22 (contrast) N4*")"
ATSA (2+N1) 27 (contrast) S0
ENDF
LOCA 14 37
N2=37
S2=""
Dial_Key:
KEYG S0
LENG S0 N1
SWIT N1
CASE 1
IF FIND S0 "m"
S2=S0
SET SUCC ON
GOTO Dial_End
ENDI
IF NOT FIND "+-@#0123456789" S0
SOUN 100,100
GOTO Dial_Key
ENDI
S2=S2*S0
ATSA 14 N2 (contrast) S0
INC N2
LOCA 14 N2
GOTO Dial_Key
ENDC
CASE 2
SWIT S0
CASE "0D"
SET SUCC ON
GOTO DIAL_End
ENDC
CASE "08"
LENG S2 N0
IF GT N0 1
S2=S2(0:N0-2)
DEC N2
LOCA 14 N2
ATSA 14 N2 (contrast) " "
ELSE
S2=""
N2=37
ATSA 14 N2 (contrast) " "
ENDI
GOTO Dial_Key
ENDC
DEFA
SOUN 100,100
GOTO Dial_Key
ENDC
ENDS
ENDC
CASE 4
SWIT S0
CASE "4900"
N0=N0-10
IF LT N0 0
N0=90
ENDI
GOTO Dial_Loo
ENDC
CASE "5100"
N0=N0+10
IF GE N0 100
N0=0
ENDI
GOTO Dial_Loo
ENDC
CASE "4700"
N0=0
GOTO Dial_Loo
ENDC
CASE "4F00"
N0=90
GOTO Dial_Loo
ENDC
DEFA
SOUN 100,100
GOTO Dial_Key
ENDC
ENDS
ENDC
DEFA
SET SUCC OFF
ENDC
ENDS
Dial_End:
WCLO
RETU
Accessry:
GOSU Ask_AccN
IF NOT SUCCESS or NULL S2 GOTO Main
S0="WARNING: An accessory ends LEARN. Enter Y to proceed."
GOSU Ask_YN
IF NOT SUCCESS GOTO Main
WRIT "; Accessory!"
WRIT "ACCESSORY `""
LENG S2 N2
WRIT S2 N2
WRIT "`"!"
GOSU End_Lear
ACCE S2
Dummy1:
GOTO Main
Ask_AccN:
N0=0
WOPE 2 10 15 70 (contrast) ASK_ESC
ATSA 2 12 (contrast) " Learn Accessory "
ATSA 13 10 (contrast) "ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"
ATSA 14 12 (contrast) "Enter entry #:"
ATSA 15 20 (contrast) " Press ESC to cancel "
Acc_Loop:
SCRO 0,3,12 12,68 (contrast)
FOR N1=1,10
N4=N0+N1
ANAM S0 N4
ATSA (2+N1) 12 (contrast) N4*")"
ATSA (2+N1) 17 (contrast) S0
ENDF
LOCA 14 27
N2=27
S2=""
Acc_Key:
KEYG S0
LENG S0 N1
SWIT N1
CASE 1
IF NOT FIND "0123456789" S0
SOUN 100,100
GOTO Acc_Key
ENDI
S2=S2*S0
ATSA 14 N2 (contrast) S0
INC N2
LOCA 14 N2
GOTO Acc_Key
ENDC
CASE 2
SWIT S0
CASE "0D"
SET SUCC ON
GOTO Acc_End
ENDC
CASE "08"
LENG S2 N0
IF GT N0 1
S2=S2(0:N0-2)
DEC N2
LOCA 14 N2
ATSA 14 N2 (contrast) " "
ELSE
S2=""
N2=27
ATSA 14 N2 (contrast) " "
ENDI
GOTO Acc_Key
ENDC
DEFA
SOUN 100,100
GOTO Acc_Key
ENDC
ENDS
ENDC
CASE 4
SWIT S0
CASE "4900"
N0=N0-10
IF LT N0 0
N0=40
ENDI
GOTO Acc_Loop
ENDC
CASE "5100"
N0=N0+10
IF GE N0 50
N0=0
ENDI
GOTO Acc_Loop
ENDC
CASE "4700"
N0=0
GOTO Acc_Loop
ENDC
CASE "4F00"
N0=40
GOTO Acc_Loop
ENDC
DEFA
SOUN 100,100
GOTO Acc_Key
ENDC
ENDS
ENDC
DEFA
SET SUCC OFF
ENDC
ENDS
Acc_End:
WCLO
RETU
Script:
S1="Enter the script file name:"
GOSU Ask_File
IF NOT SUCCESS or NULL S0 GOTO Main
S2=S0
IF NOT ISSCFILE S2
S0="Script file not found: "*S2
GOSU Error
GOTO Script
ENDI
S0="WARNING: A script call ends LEARN. Enter Y to proceed."
GOSU Ask_YN
IF NOT SUCCESS GOTO Main
WRIT "; Script!"
WRIT "EXECUTE `""
WRIT S2
WRIT "`"!"
GOSU End_Lear
EXEC S2
Dummy2:
GOTO Main
Chdir:
S1="Enter the new drive:subdirectory:"
GOSU Ask_File
IF NOT SUCCESS or NULL S0 GOTO Main
S0="CHDIR `""*S0&"`""
PERF S0
GOTO Output
DlDir:
S1="Enter the new download drive:subdirectory:"
GOSU Ask_File
IF NOT SUCCESS or NULL S0 GOTO Main
S0="SET DLDIR `""*S0&"`""
PERF S0
GOTO Output
Log:
IF STRCMP "_LOGG" "OFF"
S1="Enter the transcript file name:"
GOSU Ask_File
IF NOT SUCCESS or NULL S0 GOTO Main
S0="LOG OPEN `""*S0&"`""
SET FLAG(2) ON
ELSE
IF NOT FLAG(2)
LOG CLOS
GOTO Main
ENDI
S0="LOG CLOSE"
ENDI
PERF S0
GOSU StatusLi
GOTO Output
LogHold:
IF STRCMP "_LOGG" "OFF" GOTO Main
IF STRCMP "_LOGH" "OFF"
S0="LOG SUSPEND"
ELSE
S0="LOG RESUME"
ENDI
PERF S0
GOSU StatusLi
GOTO Output
Parms:
S0=""
S1=""
S2=""
S3=""
GOSU Ask_Parm
LJ S0
SWIT S0
CASE "_NULL"
GOTO Main
ENDC
CASE "1"
S0="SET BAUD 300"
GOTO Even_7_1
ENDC
CASE "2"
S0="SET BAUD 1200"
GOTO Even_7_1
ENDC
CASE "3"
S0="SET BAUD 2400"
GOTO Even_7_1
ENDC
CASE "4"
S0="SET BAUD 4800"
GOTO Even_7_1
ENDC
CASE "5"
S0="SET BAUD 9600"
GOTO Even_7_1
ENDC
CASE "6"
S0="SET BAUD 19K"
GOTO Even_7_1
ENDC
CASE "7"
S0="SET BAUD 38K"
GOTO Even_7_1
ENDC
CASE "8"
S0="SET BAUD 57K"
GOTO Even_7_1
ENDC
CASE "9"
S0="SET BAUD 115K"
GOTO Even_7_1
ENDC
CASE "10"
S0="SET BAUD 300"
GOTO None_8_1
ENDC
CASE "11"
S0="SET BAUD 1200"
GOTO None_8_1
ENDC
CASE "12"
S0="SET BAUD 2400"
GOTO None_8_1
ENDC
CASE "13"
S0="SET BAUD 4800"
GOTO None_8_1
ENDC
CASE "14"
S0="SET BAUD 9600"
GOTO None_8_1
ENDC
CASE "15"
S0="SET BAUD 19K"
GOTO None_8_1
ENDC
CASE "16"
S0="SET BAUD 38k"
GOTO None_8_1
ENDC
CASE "17"
S0="SET BAUD 57k"
GOTO None_8_1
ENDC
CASE "18"
S0="SET BAUD 115K"
GOTO None_8_1
ENDC
CASE "19"
S0="SET PARITY EVEN"
ENDC
CASE "20"
S0="SET PARITY ODD"
ENDC
CASE "21"
S0="SET PARITY ODD"
ENDC
CASE "22"
S0="SET DATA 7"
ENDC
CASE "23"
S0="SET DATA 8"
ENDC
CASE "24"
S0="SET STOP 1"
ENDC
CASE "25"
S0="SET STOP 2"
ENDC
CASE "26"
S0="SET PORT COM1"
ENDC
CASE "27"
S0="SET PORT COM2"
ENDC
CASE "28"
S0="SET PORT COM3"
ENDC
CASE "29"
S0="SET PORT COM4"
ENDC
DEFA
SOUN 100,100
GOTO Parms
ENDC
ENDS
GOTO End_Parm
Even_7_1:
S1="SET PARITY EVEN"
S2="SET DATA 7"
S3="SET STOP 1"
GOTO End_Parm
None_8_1:
S1="SET PARITY NONE"
S2="SET DATA 8"
S3="SET STOP 1"
End_Parm:
IF NOT NULL S0
PERF S0
WRIT S0*"!"
ENDI
IF NOT NULL S1
PERF S1
WRIT S1*"!"
ENDI
IF NOT NULL S2
PERF S2
WRIT S2*"!"
ENDI
IF NOT NULL S3
PERF S3
WRIT S3*"!"
ENDI
GOTO Main
Ask_Parm:
WOPE 2 10 16 70 (contrast) ASK_ESC
ATSA 2 12 (contrast) " Learn Parms "
ATSA 3 12 (contrast) " 1) 300,E,7,1"
ATSA 4 12 (contrast) " 2) 1200,E,7,1"
ATSA 5 12 (contrast) " 3) 2400,E,7,1"
ATSA 6 12 (contrast) " 4) 4800,E,7,1"
ATSA 7 12 (contrast) " 5) 9600,E,7,1"
ATSA 8 12 (contrast) " 6) 19.2,E,7,1"
ATSA 9 12 (contrast) " 7) 38.4,E,7,1"
ATSA 10 12 (contrast) " 8) 57.6,E,7,1"
ATSA 11 12 (contrast) " 9) 115K,E,7,1"
ATSA 3 28 (contrast) "10) 300,N,8,1"
ATSA 4 28 (contrast) "11) 1200,N,8,1"
ATSA 5 28 (contrast) "12) 2400,N,8,1"
ATSA 6 28 (contrast) "13) 4800,N,8,1"
ATSA 7 28 (contrast) "14) 9600,N,8,1"
ATSA 8 28 (contrast) "15) 19.2,N,8,1"
ATSA 9 28 (contrast) "16) 38.4,N,8,1"
ATSA 10 28 (contrast) "16) 57.6,N,8,1"
ATSA 11 28 (contrast) "18) 115K,N,8,1"
ATSA 3 44 (contrast) "19) Even par."
ATSA 4 44 (contrast) "20) Odd parity"
ATSA 5 44 (contrast) "21) No parity"
ATSA 7 44 (contrast) "22) 7 data bits"
ATSA 8 44 (contrast) "23) 8 data bits"
ATSA 10 44 (contrast) "24) 1 stop bit"
ATSA 11 44 (contrast) "25) 2 stop bits"
ATSA 3 60 (contrast) "26) COM1"
ATSA 4 60 (contrast) "27) COM2"
ATSA 5 60 (contrast) "28) COM3"
ATSA 6 60 (contrast) "29) COM4"
ATSA 12 10 (contrast) "ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"
COMP S0
ATSA 13,12 (contrast) "Current setting: "*S0
ATSA 14 10 (contrast) "ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"
ATSA 15 12 (contrast) "Enter selection #:"
ATSA 16 30 (contrast) " Press ESC to cancel "
ATGE 15 31 (contrast) 2 S0
WCLO
RETU
Encrypt:
GOSU Ask_Encr
SWIT S0
CASE "_NULL"
GOTO Main
ENDC
CASE "1"
S2="ENCRYPT"
S3="SIMPLE"
ENDC
CASE "2"
S2="DECRYPT"
S3=""
ENDC
DEFA
SOUN 100,100
GOTO Encrypt
ENDC
ENDS
EncrSrc:
S1="Enter the file to be encrypted/decrypted:"
GOSU Ask_File
IF NOT SUCCESS or NULL S0 GOTO Main
IF NOT ISFILE S0
S0="File does not exist: "*S0
GOSU Error
GOTO EncrSrc
ENDI
S4=S0
EncrDest:
S1="Name the output of encryption/decryption:"
GOSU Ask_File
IF NOT SUCCESS or NULL S0 GOTO Main
IF ISFILE S0
S0="File exists: "*S0&". Delete it Y/N?"
GOSU Ask_YN
IF SUCCESS
DELE S0
ELSE
GOTO EncrSrc
ENDI
ENDI
S5=S0
EncrPsw:
S1="Enter the password:"
GOSU Ask_File
IF NOT SUCCESS or NULL S0 GOTO Main
S6=S0
S0=S2&" S4 S5 S6 "*S3
PERF S0
IF NOT SUCCESS
S0="Encrypt/decrypt failed. Nothing logged to script."
GOSU Error
Goto Main
ENDI
WRIT "; Encrypt/decrypt!"
WRIT "MESS `"Enter the encrypt/decrypt source: `"!"
WRIT "GET S1 60!"
WRIT "MESS `"Enter the encrypt/decrypt destination: `"!"
WRIT "GET S2 60!"
WRIT "MESS `"Enter the encrypt/decrypt password: `"!"
WRIT "GET S3 60!"
WRIT S2&" S1 S2 S3 "*S3*"!"
GOTO Main
Ask_Encr:
WOPE 2 20 8 60 (contrast) ASK_ESC
ATSA 2 22 (contrast) " Learn D/Encrypt "
ATSA 4 22 (contrast) " 1) Simple encryption"
ATSA 5 22 (contrast) " 2) Decrypt encrypted file"
ATSA 6 20 (contrast) "ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"
ATSA 7 22 (contrast) "Enter selection #:"
ATSA 8 30 (contrast) " Press ESC to cancel "
ATGE 7 41 (contrast) 1 S0
WCLO
RETU
Blnkln:
S0="SET BSUPPRESS ON"
IF STRCMP "_BSUP" "ON "
S0="SET BSUPPRESS OFF"
ENDI
PERF S0
GOSU StatusLi
GOTO Output
CRLF:
S0="SET CR CR_LF"
IF STRCMP "_CRLF" "ON "
S0="SET CR CR"
ENDI
PERF S0
GOSU StatusLi
GOTO Output
Screen:
DWIN CLEAR
CLEA (default)
SSIZ N99
DWIN N99-12,2 N99-12 77
BOX N99-13,0,(N99-11),79 (default)
ATSA 0,0 (default) ">>ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ<<"
ATSA 0,3 (default) " Learn "
ATSA (N99-13),3 (default) " Keyboard "
ATSA N99-11,28 (default) " ESC to terminate "
ATSA N99-11,53 (default) " Press F10 for info "
ATSA N99-10,2 (default) "F1 Load accessory Alt-Q Toggle CR/CRLF Alt-P Set comm parms"
ATSA N99-9,2 (default) "F2 Execute script Alt-E Toggle echo Alt-G Toggle blnkln "
ATSA N99-8,2 (Default) "F3 Change drive:subdir Alt-C Clear screen PgUp Upload "
ATSA N99-7,2 (Default) "F4 Set dft dlo subdir Alt-L Toggle 25/43 PgDn Download "
ATSA N99-6,2 (Default) "F5 Toggle line/char Alt-H Hangup Alt-F10 Shell to DOS "
ATSA N99-5,2 (Default) "F6 Toggle learn hold Alt-D Dial Alt-0/9 Send macro "
ATSA N99-4,2 (Default) "F7 Toggle logging file Alt-N Encrypt/decrypt Ctl-End Send break "
ATSA N99-3,2 (Default) "F9 Toggle log hold Alt-Z Toggle masking Ctl-Prt Toggle print "
SCRO 0,N99-2,0 N99-2,79 "_BAR"
GOSU StatusLi
N95=1
N96=0
N93=N99-12
N94=2
RETU
StatusLi:
IF STRCMP "_DUPL" "HALF"
ATSA N99-2,2 "_bar" "Echo"
ELSE
ATSA N99-2,2 "_bar" " "
ENDI
IF STRCMP "_MASK" "ON"
ATSA N99-2,8 "_bar" "Mask"
ELSE
ATSA N99-2,8 "_bar" " "
ENDI
IF STRCMP "_BSUP" "ON "
ATSA N99-2,14 "_bar" "NoBln"
ELSE
ATSA N99-2,14 "_bar" " "
ENDI
IF STRCMP "_CRLF" "ON "
ATSA N99-2,21 "_bar" "CR_LF"
ELSE
ATSA N99-2,21 "_bar" " "
ENDI
IF STRCMP "_LOGG" "ON "
ATSA N99-2,28 "_bar" "Logging"
IF STRCMP "_LOGH" "ON"
ATSA N99-2,37 "_bar" "Log held"
ELSE
ATSA N99-2,37 "_bar" " "
ENDI
ELSE
ATSA N99-2,28 "_bar" " "
ATSA N99-2,37 "_bar" " "
ENDI
IF FLAG(1)
ATSA N99-2,47 "_bar" "Print"
ELSE
ATSA N99-2,47 "_bar" " "
ENDI
IF FLAG(9)
ATSA N99-2,60 "_bar" "CharMode"
ELSE
ATSA N99-2,60 "_bar" "LineMode"
ENDI
IF FLAG(8)
ATSA N99-2,70 "_bar" "LearnHeld"
ELSE
ATSA N99-2,70 "_bar" " "
ENDI
RETU
Help:
WOPE 0,0,23,79 (default) HELPESC
ATSA 0,2 (Default) " Learn Help "
ATSA 23,28 (Default) " Press any key to continue "
ATSA 1,2 (default) " The LEARN script creates a script based upon the actions taken. The"
ATSA 2,2 (default) "function keys that LEARN will recognize and act upon are listed on the main"
ATSA 3,2 (default) "screen. Each function results in an addition to the script being created,"
ATSA 4,2 (default) "with the exception of Alt-F10 (which allows editing of the script while it"
ATSA 5,2 (default) "is being created... it does not add a SHELL command to the script)."
ATSA 6,2 (default) ""
ATSA 7,2 (default) " Initially LEARN is in 'line mode'. When characters (a-z, 1-9) are typed,"
ATSA 8,2 (default) "they echo in the keyboard box. When RETURN is typed, the whole line is"
ATSA 9,2 (default) "transmitted, and the appropriate script line(s) are written. The 'mode' may"
ATSA 10,2 (default) "be switched to 'character', where each keystroke is transmitted when it is"
ATSA 11,2 (default) "typed (and each keystroke generates a WAITFOR/TRANSMIT command)."
ATSA 12,2 (default) ""
ATSA 13,2 (default) "NOTE: The display doubles carets and exclamation points. This is done to"
ATSA 14,2 (default) "allow the the keystroke to correctly transmitted. Don't be surprised!!"
ATSA 15,2 (default) ""
ATSA 16,2 (default) " The LEARN script may be put on HOLD with the F6 key. When held, what"
ATSA 17,2 (default) "is typed is sent, no script is generated, and no functions are available."
ATSA 18,2 (default) ""
ATSA 19,2 (default) " LEARN does not provide all the functionality of COM-AND. The basic"
ATSA 20,2 (default) "set of functions required to go on-line are provided. Additional settings"
ATSA 21,2 (default) "may be added to the output script. Extensive editing of the output script"
ATSA 22,2 (default) "is recommended in any case."
KEYG S0
WCLO
RETU
HELPESC:
RETU
Error:
WOPE 10,10,12,70 (contrast) Err_Esc
ATSA 10,12 (contrast) " Learn Error "
ATSA 11,12 (contrast) S0(0:55)
ATSA 12,26 (contrast) " Press any key to continue "
KEYG S0
WCLO
Err_Esc:
RETU
Ask_File:
WOPE 10 10 13 70 (contrast) ASK_ESC
ATSA 10 12 (contrast) " Learn Fname "
ATSA 11 12 (contrast) S1(0:56)
ATSA 13 30 (contrast) " Press ESC to cancel "
ATGE 12 12 (contrast) 54 S0
WCLO
LJ S0
S0=S0&""
UPPE S0
IF NOT NULL S0
SET SUCC ON
ELSE
SET SUCC OFF
ENDI
RETU
Ask_Esc:
S0=""
RETU
Ask_YN:
WOPE 10 10 13 70 (contrast) ASK_ESC
ATSA 10 12 (contrast) " Learn Y/N "
ATSA 11 12 (contrast) S0(0:55)
ATSA 13 30 (contrast) " Press ESC to cancel "
ATGE 12 12 (contrast) 1 S0
WCLO
IF NULL S0 or FIND S0 "Y"
SET SUCC ON
ELSE
SET SUCC OFF
ENDI
RETU
WriteLn:
WRIT S0
WRIT "!" 1
RETU
Initial:
IF CONNECTED
S0="; -------------------------------------------------------"
GOSU WriteLn
S0="; WARNING: This script learned after connection was made "*"_Date"
GOSU WriteLn
S0="; ------------------------------------------------------- "
GOSU WriteLn
GOTO No_Init
ENDI
S0="; Initial state: "*"_Date"
GOSU WriteLn
S0="SET DUPLEX "*"_DUPL"
GOSU WriteLn
S0="EMULATE "*"_EMUL"
GOSU WriteLn
S0="SET 25"
IF GT "_SSIZ" 25
S0="SET 43"
ENDI
GOSU WriteLn
S0="SET MASK "*"_MASK"
GOSU WriteLn
S0="SET CR CR_LF"
IF STRCMP "_CRLF" "OFF"
S0="SET CR CR"
ENDI
GOSU WriteLn
COMP S1
S0="SET PORT "*S1(11:14)
GOSU WriteLn
S0="SET BAUD "*S1(0:3)
GOSU WriteLn
IF STRCMP S1(5:5) "E"
S0="SET PARITY EVEN"
ELSE
IF STRCMP S1(5:5) "O"
S0="SET PARITY ODD"
ELSE
S0="SET PARITY NONE"
ENDI
ENDI
GOSU WriteLn
S0="SET DATA "*S1(7:7)
GOSU WriteLn
S0="SET STOP "*S1(9:9)
GOSU WriteLn
No_Init:
S0="; Learned script"
GOSU WriteLn
S0="LEGEND `"Script learned: `"*`""*"_Date"*"`""
GOSU WriteLn
IF FLAG(1)
S0="PRINTER ON"
ELSE
S0="PRINTER OFF"
ENDI
GOSU WriteLn
S0="SET CHAT "*"_CHAT"
GOSU WriteLn
S0="SET KBDB "*"_KBDB"
GOSU WriteLn
RETU


  3 Responses to “Category : Communication (modem) tools and utilities
Archive   : CA29-3.ZIP
Filename : LEARN.CMD

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/