DoorGram

This software was almost developed to aid in the programming of the DoorKing of door entry systems over a serial modem. Development ceased at the time when I did not have a hardware serial modem to provide. This software will only be catered to either DOS or Linux systems. Windows and other platforms may not allow direct access to modems for dialing AT codes in operation of devices like security entry systems.

_TITLE "DoorGram Script Writer 1.0 by Page Telegram, 2018"
CLS: ky = 0
INPUT "What is NEW or CURRENT DoorKing password ####?", pwd$
SHELL _HIDE "dir/b > files"
OPEN "files" FOR INPUT AS #1
DO
    IF NOT (EOF(1)) THEN INPUT #1, ot$
    IF LCASE$(ot$) = "pwd" THEN ky = 1

LOOP UNTIL EOF(1)
CLOSE #1
IF ky = 1 THEN
    OPEN "pwd" FOR INPUT AS #2
    INPUT #2, ot$
    CLOSE #2
    IF ot$ <> pwd$ THEN
        BEEP: PRINT "Password not Correct!": SLEEP: SYSTEM
    ELSE
        pass$ = ot$
    END IF
ELSE
    SHELL _HIDE "echo " + pwd$ + " > pwd"

END IF
SHELL _HIDE "echo Beginning DoorKing Script Sequence " + DATE$ + " at " + TIME$ + " > script.txt"
beg: CLS
COLOR 15
PRINT "DoorKing Script Generator v1.0 by Page Telegram"
COLOR 7
PRINT "1. Change DoorKing Password (Requires Key)     "
PRINT "2. Add 10-digit Phone Number / 3-Digit Code    "
PRINT "3. Delete 10-digit Phone Number / 3-Digit Code "
PRINT "4. Add 5-Digit Access Code                     "
PRINT "5. Delete 5-Digit Access Code                  "
PRINT "6. Delete ALL Access Codes                     "
PRINT "7. Open Script and Close                       "
PRINT "0. Quit / Cancel All                           "
COLOR 14
DO
    SELECT CASE INKEY$
        CASE "0":
            SHELL _HIDE "shell del script.txt"
            SYSTEM
        CASE "1":
            PRINT "You will need to change this password physically on the DoorKing Unit"
            PRINT "with the key provided to you by DoorKing. Turn the key and enter the new"
            PRINT "four digit code. Then report back here to update that code."
            PRINT
            PRINT "What is the new DoorKing Password #### (Press '0' and '#' at same time when done)"
            INPUT "?>", pwd$
            SHELL _HIDE "echo " + pwd$ + " > pwd"
            GOTO beg:
        CASE "2":
            INPUT "Three Digit Code to Add?", cadd$
            INPUT "Ten-Digit Phone Number?", phone$
            code$ = "*01," + pwd$ + "," + cadd$ + "," + phone$ + "*, 'Press '0' and '#' at same time"
            PRINT code$

            SLEEP
            SHELL _HIDE "echo " + code$ + " >> script.txt"
            GOTO beg:
        CASE "3":
            INPUT "Three Digit Code to Delete?", cadd$
            code$ = "*01," + pwd$ + "," + cadd$ + "," + "##########" + "*, 'Press '0' and '#' at same time"
            PRINT code$

            SLEEP
            SHELL _HIDE "echo " + code$ + " >> script.txt"
            GOTO beg:

        CASE "4":
            INPUT "Five Digit Code to Add?", cadd$
            'INPUT "Ten-Digit Phone Number?", phone$
            code$ = "*09," + pwd$ + "," + cadd$ + "*, 'Press '0' and '#' at same time"
            PRINT code$

            SLEEP
            SHELL _HIDE "echo " + code$ + " >> script.txt"
            GOTO beg:

        CASE "5":
            INPUT "Five Digit Code to Delete?", cadd$
            'INPUT "Ten-Digit Phone Number?", phone$
            code$ = "*10," + pwd$ + "," + cadd$ + "*, 'Press '0' and '#' at same time"
            PRINT code$

            SLEEP
            SHELL _HIDE "echo " + code$ + " >> script.txt"
            GOTO beg:

        CASE "6":
            PRINT "Delete All Access Codes"
            code$ = "*11," + pwd$ + "9999*, 'Press '0' and '#' at same time"
            PRINT code$

            SLEEP
            SHELL _HIDE "echo " + code$ + " >> script.txt"
            GOTO beg:

        CASE "7": SHELL "notepad script.txt": SHELL _HIDE "del script.txt": SYSTEM
    END SELECT
LOOP