home *** CD-ROM | disk | FTP | other *** search
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;; AutoMate Automated File Transfer Script for Qmodem 4.XX ;;;
- ;;; By Marc S. Hedish, ABSOLUT(e)LY TEMPORARY (702) 254-8601 ;;;
- ;;; (C) Copyright 1991 Marc S. Hedish - All Rights Reserved ;;;
- ;;; Version 1.2 - 02/15/91 - Production Release ;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- If "$0" = "AMDIAL" Start
- Graphics ANSI
- TurnOn 8_BIT
- TurnOff ECHO PRINT SPLIT BS_DEL LINEFEED
- String QWKFILE REPFILE NAME PROT DOORNUM CMDFILE CMD FILENAME UP DN FIRST
- String DESCRIPTION PWORD TEMP OLDATTR STATUS TRIES CONF CHECK LANG PROMPT TYPE
- GoTo Start
- GetMail:
- If "$TYPE" = "QMH" NA
- TimeOut 45 Abort
- Send "^M"
- WaitFor "$PROMPT"
- Delay 1000
- If "$TYPE" = "SF" SFG
- Send "OPEN $DOORNUM^M"
- XGetMail:
- TimeOut 300 Abort
- When "doors are" NoDoors
- When "<NO TRANSFER>" NoMsg
- When "No Messages Found..." NoMsg
- When "<DLASK>" "Y^M"
- When "<AUTOSTART>" "^[^["
- When "this packet" "Y^M"
- When "]oodbye" "Y^M"
- When "Type for transfer" "$PROT^M"
- When "Begin Your Download" Mega
- When "Choice - [" SFM
- Assign TRIES 1
- Loop6:
- WaitFor "Command"
- Pause 1000
- Send "D$PROT^M"
- WaitFor "$QWKFILE"
- Mega:
- Pause 1000
- AtWrite 61 05 031 "Attempt - $TRIES"
- Assign CHECK $PROT
- Gosub CheckProtocol
- Download $PROT $DN$QWKFILE
- If $SUCCESS Loop7
- WaitFor "Command"
- Incr TRIES
- If "$TRIES" > "3" FailedGetMail
- GoTo Loop6
- Loop7:
- When "abort automatic" SFMailDone
- When "MegaMail" MegaDone
- Send "^M"
- WaitFor "Command"
- Loop7a:
- Pause 1000
- Readfile CMD
- If "$CMD" = "LogOff" Log2
- Send "Q^M"
- Assign TEMP Skip
- MegaDone:
- WaitFor "$PROMPT"
- Return
- SFG:
- If "$CMD" = "ExchangeMail" SFG1:
- Send "M^M"
- WaitFor "$PROMPT"
- Delay 1000
- SFG1:
- Send "$DOORNUM^M"
- Assign TEMP SFM
- GoTo XGetMail
- SFMail:
- When "protocol:" "$PROT^M"
- When "return you" "Y"
- Delay 1000
- Send "1^M"
- WaitFor "to process:"
- Pause 2000
- Send "Q^M"
- WaitFor "to extract:"
- Pause 1000
- Send "N"
- When "you? [y/n]" "Y^M"
- WaitFor "Ready to send"
- GoTo Mega
- SFMailDone:
- When
- Send "A"
- SFMD:
- WaitFor "$PROMPT"
- GoTo Loop7a
- FailedGetMail:
- Decr TRIES
- AtWrite 12 06 252 " Failed download of $QWKFILE after $TRIES attempts. "
- Stamp Failed download of mail packet $QWKFILE after $TRIES attempts.
- Gosub Error
- GoTo Loop7
- NoDoors:
- AtWrite 12 06 252 " Mail door not available at the present time. "
- Stamp Mail door not available at the present time.
- Gosub Error
- Return
- NoMsg:
- Stamp No messages found to retrieve. Unable to download $QWKFILE.
- GoTo Loop7
- CheckProtocol:
- If "$CHECK" = "G" Abort
- If "$CHECK" = "F" Abort
- If "$CHECK" = "Y" Abort
- If "$CHECK" = "O" Abort
- If "$CHECK" = "R" Abort
- If "$CHECK" = "C" Abort
- If "$CHECK" = "X" Abort
- If "$CHECK" = "A" Abort
- GetScr
- Return
- SendReplies:
- If "$TYPE" = "QMH" NA
- Exist $UP$REPFILE DoIt
- AtWrite 18 06 252 " No replies to send. $REPFILE not found. "
- Stamp No replies to send. $REPFILE not found.
- Gosub Error
- Return
- DoIt:
- TimeOut 45 Abort
- Send "^M"
- WaitFor "$PROMPT"
- Delay 1000
- If "$TYPE" = "SF" SFR
- Send "OPEN $DOORNUM^M"
- SFC:
- When "no DOORS are" NoDoors
- When "transfer now..." DjSend
- When "Reader Now..." DjSend
- When "Sorry" CantSend
- When "Type for transfer" "$PROT^M"
- When "Choice - [" SFM
- Assign TRIES 1
- Loop8:
- WaitFor "Command"
- Pause 1000
- Send "U$PROT^M"
- WaitFor "$REPFILE"
- DjSend:
- Pause 1000
- AtWrite 61 05 031 "Attempt - $TRIES"
- Assign CHECK $PROT
- Gosub CheckProtocol
- Upload $PROT $UP$REPFILE
- If $SUCCESS Loop9
- Send "^M"
- Incr TRIES
- If "$TRIES" > "3" FailedSendReplies
- GoTo Loop8
- Loop9:
- If "$CMD" = "ExchangeMail" Abort
- If "$TEMP" = "SFM" SFMD
- Send "^M"
- WaitFor "Command"
- GoTo Loop7a
- SFR:
- Send "M^M"
- WaitFor "$PROMPT"
- Delay 1000
- Send "$DOORNUM^M"
- GoTo SFC
- SFM:
- If "$TEMP" = "SFM" SFMail
- When "protocol:" "$PROT^M"
- Assign TEMP SFM
- Delay 1000
- Send "2^M"
- WaitFor "abort!"
- GoTo DjSend
- FailedSendReplies:
- Decr TRIES
- AtWrite 12 06 252 " Failed upload of $REPFILE after $TRIES attempts. "
- Stamp Failed upload of mail packet $REPFILE after $TRIES attempts.
- Gosub Error
- Send "^M"
- GoTo Loop9
- CantSend:
- Stamp Unable to send replies. Not enough available time.
- GoTo Loop9
- DeleteReplies:
- Exist $UP$REPFILE DelReplyPacket
- Return
- DelReplyPacket:
- DOS "ERASE $UP$REPFILE"
- Exist $UP$REPFILE RepliesNotDeleted
- Return
- RepliesNotDeleted:
- AtWrite 12 06 252 " ERROR! - Could not delete replies. "
- Stamp Could not delete replies - $UP$REPFILE.
- Gosub Error
- Return
- DeleteMail:
- Exist $DN$QWKFILE DelMailPacket
- Return
- DelMailPacket:
- DOS "ERASE $DN$QWKFILE"
- Exist $DN$QWKFILE MailNotDeleted
- Return
- MailNotDeleted:
- AtWrite 12 06 252 " ERROR! - Could not delete mail packet. "
- Stamp Could not delete mail packet - $DN$QWKFILE.
- Gosub Error
- Return
- ExchangeMail:
- Gosub SendReplies
- If "$TEMP" = "SFM" GetMail
- Exist $UP$REPFILE XGetMail
- GoTo GetMail
- GetFiles:
- TimeOut 45 Loop3
- When "] Command" ProGet
- When "not found" FileNotFound
- When "does not exist" FileNotFound
- When "no match." FileNotFound
- When "Start your download" GetEm2
- When "download of" GetEm2
- When "password for downloading?" PwdGet
- When "Incorrect" BadPwd
- Loop2:
- ReadFile FILENAME
- If "$FILENAME" = "_EOF_" AbortFile
- If "$FILENAME" = " " AbortFile
- If "$FILENAME" = "*" AbortFile
- AtWrite 61 05 031 " "
- AtWrite 61 05 031 "$FILENAME"
- Assign TRIES 0
- Loop3:
- If $OFFLINE Abort
- Incr TRIES
- Send "^M"
- WaitFor "$PROMPT"
- Delay 1000
- If "$TYPE" = "SF" SFGet
- If "$TYPE" = "GAP" SFGet
- If "$TYPE" = "QMH" QMGet
- Send "D $FILENAME $PROTOCOL^M"
- GetEm:
- WaitFor "(Ctrl-X)"
- GetEm2:
- Delay 1000
- Assign CHECK $PROTOCOL
- Gosub CheckProtocol
- Download $PROTOCOL $DN$FILENAME
- If $SUCCESS Loop2
- Incr TRIES
- If "$TRIES" > "3" FailedDownload
- GoTo Loop3
- SFGet:
- If "$TEMP" = "Y" SFGet1
- Send "F"
- SFGet1:
- Send "^M"
- WaitFor "$PROMPT"
- Assign TEMP Y
- Delay 1000
- If "$TYPE" = "GAP" GAPGet
- When "Protocol" "$PROTOCOL^M"
- When "transfer now" "Y^M"
- When "Ready to Send" GetEm2
- When "not allowed here" Loop3
- Send "D^M"
- WaitFor "download:"
- Delay 1000
- Send "$FILENAME^M^M"
- WaitFor "$PROMPT"
- GoTo Loop3
- QMGet:
- Send "D^M"
- WaitFor "aborts > "
- Delay 1000
- Send "$PROTOCOL^M"
- WaitFor "ends > "
- Delay 1000
- Send "$FILENAME^M^M"
- WaitFor "Cancel"
- GoTo GetEm2
- GAPGet:
- When "(e/c)" "C^M"
- When "Log Off" "N^M"
- Send "D $FILENAME $PROTOCOL^M^M"
- WaitFor "Ready To Send"
- GoTo GetEm2
- ProGet:
- Delay 1000
- Send "D $PROTOCOL $FILENAME S^M"
- GoTo GetEm
- PwdGet:
- ReadFile DESCRIPTION
- If "$DESCRIPTION" = "_EOF_" Abort
- If "$DESCRIPTION" = " " Abort
- If "$DESCRIPTION" = "*" Abort
- Send "$DESCRIPTION^M"
- GoTo GetEm
- FailedDownload:
- Decr TRIES
- Stamp Failed download of $FILENAME after $TRIES attempts.
- GoTo Loop2
- FileNotFound:
- Stamp Failed download. $FILENAME not on $BOARD.
- GoTo Loop2
- BadPwd:
- Stamp Failed download of $FILENAME due to incorrect password.
- GoTo Loop2
- AbortFile:
- If "$TEMP" <> "Y" Abort
- Send "^M"
- WaitFor "$PROMPT"
- Delay 1000
- Send "Q^M"
- Return
- SendFiles:
- TimeOut 45 Loop5
- When "] Command" ProSend
- When "duplicates a current board file." OnFile
- When "already exists" OnFile
- When "Sorry" NoUploads
- When "currently disabled" NoUploads
- Loop4:
- ReadFile FILENAME
- If "$FILENAME" = "_EOF_" AbortFile
- If "$FILENAME" = " " AbortFile
- If "$FILENAME" = "*" AbortFile
- If "$TYPE" = "QMH" SkipDesc
- If "$TYPE" <> "GAP" ReadDesc
- ReadFile CONF
- If "$CONF" = "_EOF_" AbortFile
- If "$CONF" = " " AbortFile
- If "$CONF" = "*" AbortFile
- ReadFile PWORD
- If "$PWORD" = "_EOF_" AbortFile
- If "$PWORD" = " " AbortFile
- If "$PWORD" = "*" AbortFile
- ReadDesc:
- ReadFile DESCRIPTION
- If "$DESCRIPTION" = "_EOF_" AbortFile
- If "$DESCRIPTION" = " " AbortFile
- If "$DESCRIPTION" = "*" AbortFile
- AtWrite 61 05 031 " "
- AtWrite 61 05 031 "$FILENAME"
- SkipDesc:
- Assign TRIES 0
- Exist $UP$FILENAME Loop5
- AtWrite 12 06 252 " $FILENAME not found in upload directory. "
- Stamp Failed upload. $FILENAME not found in upload directory.
- Gosub Error
- GoTo Loop4
- Loop5:
- If $OFFLINE Abort
- Incr TRIES
- Send "^M"
- WaitFor "$PROMPT"
- Delay 1000
- If "$TYPE" = "SF" SFSend
- If "$TYPE" = "GAP" SFSend
- If "$TYPE" = "QMH" QMSend
- Send "U $FILENAME $PROTOCOL^M"
- WaitFor "?"
- Delay 1000
- Send "$DESCRIPTION^M"
- Delay 1000
- Send "^M"
- SendEm:
- WaitFor "(Ctrl-X)"
- SendEm2:
- Delay 1000
- Assign CHECK $PROTOCOL
- Gosub CheckProtocol
- Upload $PROTOCOL $UP$FILENAME
- If $SUCCESS Loop4
- Incr TRIES
- If "$TRIES" > "3" FailedUpload
- GoTo Loop5
- SFSend:
- If "$TEMP" = "Y" SFSend1
- Send "F"
- SFSend1:
- Send "^M"
- WaitFor "$PROMPT"
- Assign TEMP Y
- Delay 1000
- If "$TYPE" = "GAP" GAPSend
- When "Protocol" "$PROTOCOL^M"
- When "transfer now" "Y^M"
- When "Ready to Receive" SendEm2
- Send "U^M"
- WaitFor "upload:"
- Delay 1000
- Send "$FILENAME^M"
- WaitFor "only!"
- Delay 1000
- Send "$DESCRIPTION^M^M"
- WaitFor "$PROMPT"
- GoTo Loop4
- QMSend:
- When "CTRL-X" SendEm2
- Send "U^M"
- WaitFor "aborts > "
- Delay 1000
- Send "$PROTOCOL^M"
- WaitFor "Upload > "
- Delay 1000
- Send "$FILENAME^M"
- WaitFor "$PROMPT"
- GoTo Loop4
- GAPSend:
- When "[S]ave" "S^M"
- When "More than 1" "N^M"
- Send "U $FILENAME $PROTOCOL^M"
- WaitFor "(y/n) : "
- Delay 1000
- Send "$PWORD^M"
- WaitFor "]"
- Delay 1000
- Send "$CONF^M"
- WaitFor "1:"
- Delay 1000
- Send "$DESCRIPTION^M"
- Delay 1000
- Send "^M"
- WaitFor "Ready"
- GoTo SendEm2
- ProSend:
- Delay 1000
- Send "U $PROTOCOL $FILENAME S^M"
- GoTo SendEm
- FailedUpload:
- Decr TRIES
- Stamp Failed upload of $FILENAME after $TRIES attempts.
- GoTo Loop4
- OnFile:
- AtWrite 12 06 252 " $FILENAME already posted on $BOARD. "
- Stamp Failed upload. $FILENAME already posted on $BOARD.
- Gosub Error
- GoTo Loop4
- NoUploads:
- AtWrite 12 06 252 " Uploads are currently disabled on $BOARD. "
- Stamp Failed upload. Uploads are currently disabled on $BOARD.
- Gosub Error
- GoTo Loop4
- JoinConference:
- TimeOut 30 Abort
- When "(Enter)=no?" "^M"
- ReadFile CONF
- If "$TYPE" = "SF" NA
- If "$TYPE" = "QMH" NA
- If "$CONF" = "_EOF_" Abort
- If "$CONF" = " " Abort
- If "$CONF" < "0" BadConf
- If "$CONF" > "999" BadConf
- AtWrite 61 05 031 " "
- AtWrite 61 05 031 "$CONF"
- Send "^M"
- WaitFor "$PROMPT"
- Delay 1000
- Send "J $CONF^M"
- WaitFor "$PROMPT"
- Return
- BadConference:
- AtWrite 12 06 252 " Error! - Conference number '$CONF' invalid. "
- Stamp Error! - Confernce number '$CONF' invalid.
- Gosub Error
- Return
- GetBulletins:
- TimeOut 45 Abort
- When "(Enter)=no change?" "$PROTOCOL^M"
- ReadFile FILENAME
- If "$TYPE" = "SF" NA
- If "$TYPE" = "GAP" NA
- If "$TYPE" = "QMH" NA
- If "$FILENAME" = "_EOF_" Abort
- If "$FILENAME" = " " Abort
- AtWrite 61 05 031 " "
- AtWrite 61 05 031 "$FILENAME"
- When "Protocol Type" BadProtocol
- When "not found on disk!" BltNotFound
- When "Start your download" GetBlt1
- When "(Ctrl-X) GetBlt1
- Assign TRIES 0
- If $OFFLINE Abort
- Incr TRIES
- Send "^M"
- WaitFor "$PROMPT"
- Delay 1000
- Send "T^M"
- WaitFor "=> ("
- Getx TEMP 1 )
- WaitFor "$PROMPT"
- Delay 1000
- Send "B $FILENAME D^M"
- GetBlt:
- WaitFor "(Ctrl-X)"
- GetBlt1:
- Delay 1000
- Assign CHECK $PROTOCOL
- Gosub CheckProtocol
- Download $PROTOCOL $DN$FILENAME
- If $SUCCESS GoodBulletin
- Incr TRIES
- If "$TRIES" > "3" FailedBulletin
- GoTo GetBlt1
- GoodBulletin:
- WaitFor "$PROMPT"
- If "$TEMP" = "$PROTOCOL" Abort
- Send "T $TEMP^M"
- Return
- FailedBulletin:
- Decr TRIES
- Stamp Failed download of bulletin $FILENAME after $TRIES attempts.
- Return
- BltNotFound:
- Stamp Failed bulletin download. Bulletin $FILENAME not on $BOARD.
- WaitFor "$PROMPT"
- Delay 1000
- Send "^M"
- GoTo GoodBulletin
- BadProtocol:
- Send "^M"
- Decr TRIES
- Stamp Failed download of bulletins. Needed BATCH protocol.
- GoTo GoodBulletin
- LogOnG:
- Assign TEMP Y
- GoTo Log1
- LogOn:
- Assign TEMP N
- Log1:
- Assign PROMPT "Command?"
- TimeOut 7 Begin
- When "# to use" "$LANG^M"
- When "First Name : " Log4
- When "Command $FIRST" NBegin
- When "Command > " QMBegin
- When "Command : " GAPBegin
- When "MENU - [" SFBegin
- WaitFor "graphics (Enter)=no?"
- Delay 100
- Begin:
- TimeOut 60 Abort
- When "Quit?" "^M"
- When "correct?" "Y^M"
- When "Password" "$PASSWORD^M"
- When "exit?" "^M"
- When "messages since" "N^M"
- When "[Y/N]" "N^M"
- When "MESSAGE SCAN" "S^M"
- When "to Main Menu?" "^M"
- Send "$TEMP Q NS^M"
- WaitFor "first name"
- Log4:
- Delay 1000
- Send "$NAME^M"
- When "ProDoor" Log3
- WaitFor "$PROMPT"
- Delay 1000
- Send "CHAT U Session Managed by AutoMate 1.2^M"
- Log3:
- WaitFor "$PROMPT"
- AtWrite 28 03 023 "- PCBoard "
- Return
- NBegin:
- Assign PROMPT "Command $FIRST"
- AtWrite 28 03 023 "- Modified PCB "
- Return
- QMBegin:
- Assign PROMPT "Command > "
- Assign TYPE QMH
- AtWrite 28 03 023 "- Qmodem Host "
- Return
- SFBegin:
- Assign PROMPT "MENU - ["
- Assign TYPE SF
- AtWrite 28 03 023 "- Spitfire "
- Return
- GAPBegin:
- Assign PROMPT "Command : "
- Assign TYPE GAP
- AtWrite 28 03 023 "- GAP "
- Return
- LogOff:
- TimeOut 60 Abort
- Send "^M"
- WaitFor "$PROMPT"
- Delay 1000
- Log2:
- Pause 1000
- Send "G^M"
- TimeOut 10 DropLine
- When "Proceed with logoff?" "Y^M"
- When "log off [Y/n]?" "Y^M"
- WaitFor "NO CARRIER"
- GoTo Done
- DropLine:
- If $OFFLINE Done
- HangUp
- GoTo DropLine
- Done:
- TurnOff Capture
- Assign Status "Test"
- Return
- SetType:
- Assign PROMPT "Command?"
- Assign TYPE PCB
- When "Command $FIRST" NBegin
- When "Command > " QMBegin
- When "Command : " GAPBegin
- When "MENU - [" SFBegin
- Send "^M"
- GoTo Log3
- SetDLPath:
- ReadFile TEMP
- If "$TEMP" = "_EOF_" Abort
- If "$TEMP" = " " Abort
- Exist $TEMP*.* GoodDN
- AtWrite 12 06 252 " Invalid Download Path. Default will be used. "
- Gosub Error
- Return
- GoodDN:
- Assign DN $TEMP
- Return
- SetULPath:
- ReadFile TEMP
- If "$TEMP" = "_EOF_" Abort
- If "$TEMP" = " " Abort
- Exist $TEMP*.* GoodUL
- AtWrite 12 06 252 " Invalid Upload Path. Default will be used. "
- Gosub Error
- Return
- GoodUL:
- Assign UP $TEMP
- Return
- SetMailDoor:
- ReadFile TEMP
- If "$TEMP" = "_EOF_" Abort
- If "$TEMP" = " " Abort
- If "$TEMP" < "0" BadDoor
- If "$TEMP" > "Z" BadDoor
- AtWrite 61 05 031 " "
- AtWrite 61 05 031 "$TEMP"
- Assign DOORNUM $TEMP
- Return
- BadDoor:
- AtWrite 12 06 252 " Invalid door number specified. $DOORNUM will be used. "
- Gosub Error
- Return
- BeginRecording:
- AtWrite 12 06 031 " Recording Session to $SCPATHAUTOMATE.CAP "
- Capture $SCPATHAUTOMATE.CAP
- Return
- EndRecording:
- TurnOff Capture
- AtWrite 12 06 031 " Session Recording Ended. "
- Return
- DeleteRecording:
- TurnOff Capture
- Exist $SCPATHAUTOMATE.CAP DelRecording
- Return
- DelRecording:
- DOS "ERASE $SCPATHAUTOMATE.CAP"
- Exist $SCPATHAUTOMATE.CAP RecordingNotDeleted
- Return
- RecordingNotDeleted:
- AtWrite 12 06 252 " ERROR! - Could not delete recording. "
- Stamp Could not delete recording - $SCPATHAUTOMATE.CAP
- Gosub Error
- Return
- ChangePassword:
- TimeOut 45 NotChanged
- ReadFile TEMP
- If "$TYPE" = "QMH" NA
- If "$TEMP" = "_EOF_" NotChanged
- If "$TEMP" = " " NotChanged
- Assign PWORD $TEMP
- When "do not match!" NotChanged
- If "$TYPE" = "SF" SFPword:
- If "$TYPE" = "GAP" GAPPword:
- When "? (" "^M"
- Send "W^M"
- WaitFor "Password"
- Delay 1000
- Send "$PWORD"
- WaitFor "Re-enter"
- Delay 1000
- Send "$PWORD"
- WaitFor "$PROMPT"
- PWDone:
- Stamp Password on $BOARD has been changed.
- Return
- SFPword:
- Send "Y^M"
- WaitFor "$PROMPT"
- Delay 1000
- Send "P^M"
- WaitFor "Password:"
- Delay 1000
- Send "$PWORD^MY"
- WaitFor "$PROMPT"
- Delay 1000
- Send "Q^M"
- GoTo PWDone
- GAPPword:
- Send "V^M"
- WaitFor "[H]elp : "
- Delay 1000
- Send "N^M"
- WaitFor "Ok?"
- Pause 1000
- Send "N^M"
- When "r password" "$PWORD"
- When " : " "^M"
- When "$FIRST" GAPPwordDone
- WaitFor "Ok?"
- GAPPwordDone:
- When
- WaitFor "OK?"
- Pause 1000
- Send "^M"
- GoTo PWDone
- NotChanged:
- AtWrite 12 06 252 " Unable to change password. "
- Stamp Error! - Unable to change password.
- Gosub Error
- WaitFor "$PROMPT"
- Return
- Abort:
- Return
- Test:
- Debug On
- Assign STATUS $CMD
- GoTo NextCMD
- Start:
- Assign OLDATTR $ATTR
- Window 01 01 $LAST_COL $LAST_ROW
- GetScr
- ClrScr
- Color 127
- Window 01 01 80 09
- ClrScr
- Color 31
- Box 07 02 74 07
- ClrScr
- AtWrite 29 02 030 " AutoMate Status Window "
- AtWrite 61 07 030 " Version 1.2 "
- AtWrite 09 03 023 "Current Connection"
- AtWrite 09 04 023 "──────────────────────────────────"
- AtWrite 09 05 031 "$BOARD "
- AtWrite 44 03 023 "Current Command"
- AtWrite 44 04 023 "────────────────"
- AtWrite 61 03 023 "Parameter"
- AtWrite 61 04 023 "────────────"
- AtWrite 75 03 007 "░░"
- AtWrite 75 04 007 "░░"
- AtWrite 75 05 007 "░░"
- AtWrite 75 06 007 "░░"
- AtWrite 75 07 007 "░░"
- AtWrite 09 08 007 "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
- AtWrite 43 08 007 "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
- Color $OLDATTR
- Window 01 10 $LAST_COL $LAST_ROW
- If "$NOTEFILE" = "" NotLinked
- Assign CMDFILE $NOTEFILE
- GoTo Linked
- NotLinked:
- If "$0" = "" NoCommands
- If "$0" = "AMDIAL" NoCommands
- Assign CMDFILE $0
- Linked:
- OpenFile $CMDFILE Read
- CheckFile:
- ReadFile CMD
- If "$CMD" = "AutoMate" SetUp
- If "$CMD" = "_EOF_" NoCommands
- GoTo CheckFile
- Setup:
- ReadFile NAME
- ReadFile QWKFILE
- ReadFile REPFILE
- ReadFile DOORNUM
- ReadFile PROT
- ReadFile LANG
- Assign UP $ULPATH
- Assign DN $DLPATH
- Assign FIRST $NAME
- Assign TYPE PCB
- If "$LANG" < ":" NextCMD
- Assign CMD "$LANG"
- Assign LANG ""
- GoTo SkipRead
- NextCMD:
- ReadFile CMD
- SkipRead:
- If "$CMD" = "_EOF_" Term
- If "$CMD" <= " " Term
- Assign TEMP ""
- Assign TEMP $CMD
- If "$TEMP" <> "$CMD" NextCMD
- AtWrite 44 05 031 " "
- AtWrite 44 05 031 "$CMD"
- AtWrite 61 05 031 " "
- If "$CMD" = "Test" Test
- If "$CMD" = "Term" Term
- When
- When "More?" "N^M"
- When "(NS)" "N^M"
- When "(S)ystem" "S^M"
- When "to continue" "^M"
- When "(Enter)=continue?" "^M"
- When "Time Limit Exceeded" NoTime
- When "(Enter)=yes?" "N^M"
- When "(Enter)=none" "^M"
- Gosub $CMD
- If "$TEMP" = "Skip" SkipRead
- If "$STATUS" = "Test" NextCMD
- If $OFFLINE Bomb
- GoTo NextCMD
- NoCommands:
- AtWrite 12 06 252 " ERROR! - No commands found in note file. Press any key. "
- Stamp No commands in note file. AutoMate aborted!
- If "$0" = "AMDIAL" NoCommandsCont
- Inkey TEMP
- NoCommandsCont:
- PutScr
- Assign 0 NoCommands
- Return
- Term:
- If "$0" = "AMDIAL" Term1
- AtWrite 12 06 031 " AutoMate Complete. Returning to Terminal Mode. "
- GoTo Term2
- Term1:
- AtWrite 12 06 031 " AutoMate Complete. Returning to AMDial. "
- Term2:
- Gosub Error
- CloseFile
- TurnOff Capture
- Color $OLDATTR
- Window 01 01 $LAST_COL $LAST_ROW
- PutScr
- If "$0" = "AMDIAL" AMDial
- Exit
- AMDial:
- Assign 0 AutoMate
- Return
- Quit:
- AtWrite 12 06 031 " Leaving Qmodem. Returning to DOS. "
- Gosub Error
- CloseFile
- TurnOff Capture
- System Y
- Bomb:
- AtWrite 12 06 252 " Error! - No longer online. AutoMate aborting. "
- Stamp Error! - No longer online. AutoMate aborted.
- Assign STATUS BOMB
- GoTo Term2
- NoTime:
- AtWrite 12 06 252 " Error! - Time limit has been exceeded on board. "
- Stamp Error! - Time limit has been exceeded on board.
- Assign STATUS BOMB
- GoTo Term2
- NA:
- Stamp $CMD not available on $TYPE boards.
- Return
- Error:
- Pause 5000
- AtWrite 12 06 031 " "
- Return