Creating "Encrypted" File Names

This program is fairly simple in essence and it's only true purpose is look nice while doing a task that, although helpful for the lazy, isn't neccessarily useful to advanced techy. This program will generate an X amount of randomized 10character names that you can use to rename files, it also "Detects" errors in the "Encryption" by notifying that the 10char. string it generated started with either a number or a symbol. Simple yes, effective kinda, and fun to look at yes, useful no. Please check it out and enjoy, post comments, suggestions or bugs if you have/find any. Thank you.:


SET WINDOW 0,50,0,50
RANDOMIZE
LET RESETALL=0
DO
LET GO=0
LET EXIT1=0
CALL SCREEN_RESET
LET SURE=0
IF RESETALL=1 THEN
LET ERROR1=0
LET GOOD=0
LET TOTAL=0
ELSE IF RESETALL<>1 THEN
EXIT IF
END IF
PRINT "*NOTE: COMPROMISED FILES ARE FILES WITH ERRORS OR FILES THAT HAVE BEEN"
PRINT "CREATED WITH A LEADING NUMERICAL OR SYMBOLIC CHARACTER."
PRINT
PRINT "ALL DESIRED ACCESSIBLE FILES AND COMPROMISED FILES WILL BE"
PRINT "ROUNDED DOWN TO THE NEAREST WHOLE NUMBER."
PRINT
PRINT "ALSO THERE MUST BE A MINIMUM OF 1 ACCESSIBLE FILE AND "
PRINT "A MINIMUM OF 0 COMPROMISED FILES."
PRINT
PRINT "IN ADDITION THE DESIRED ACCESSIBLE FILES MUST BE GREATER THAN COMPROMISED FILES."
PRINT
PRINT "WHEN YOU HAVE READ AND UNDERSTOOD THESE DIRECTIONS PRESS ANY KEY TO CONTINUE."
DO
IF KEY INPUT THEN
CLEAR
CALL SCREEN_RESET
LET EXIT1=1
END IF
LOOP UNTIL EXIT1=1
DO
DO
IF SURE<>1 THEN
INPUT PROMPT "HOW MANY ACCESSIBLE FILES WOULD YOU LIKE TO CREATE? ":TGOOD
LET TGOOD=INT(TGOOD)
IF TGOOD<1 THEN LET TGOOD=1
PRINT "AND OUT OF";TGOOD;"ACCESSIBLE FILES, HOW MANY COMPROMISED FILES WILL YOU ALLOW FOR? ";
INPUT PROMPT "":TERROR
LET TERROR=INT(TERROR)
IF TERROR<0 THEN LET TERROR=0
IF TGOOD<TERROR OR TGOOD=TERROR THEN
PRINT
CALL SCREEN_RESET
PRINT "ACCESSIBLE FILES MUST BE GREATER THAN ALLOWED ERRORS!"
PRINT
PRINT "PRESS ANY KEY TO CONTINUE AND RESET THE PARAMETERS."
DO
GET KEY EXIT
LET EXIT=1
EXIT IF
LOOP UNTIL EXIT=1
END IF
CLEAR
END IF
LOOP UNTIL TGOOD>TERROR
CALL YES_NO_SUB
LOOP UNTIL SURE=1
CLEAR
LET TOTAL=0
CALL ESC_KEY
DO
SET COLOR 2
LET TOTAL=TOTAL+1
LET PASSWORD=0
LET CODENUM=0
LET ERROR=0
LET ERR=0
LET NUM=0
LET SYMBOL=0
LET S=0
LET E=0
LET N=0
LET EF=0
LET EFFECT=0
LET EN=0
LET ENCRYPT=0
LET F=0
LET FILE=0
DO
LET PASSWORD=PASSWORD+1
LET CODE=INT(RND*79)+1
LET CODENUM=CODENUM+1
FOR I=1 TO CODE
READ X$
NEXT I
RESTORE
IF CODENUM=1 THEN
CALL ENCRYPT_FILE_NUM
ELSE IF CODENUM>1 THEN
EXIT IF
END IF
PRINT X$;
IF PASSWORD=1 AND CODE>62 THEN
LET ERROR=1
ELSE IF PASSWORD=1 AND CODE<11 THEN
LET ERROR=2
ELSE IF PASSWORD=1 AND CODE>10 AND CODE<37 THEN
LET ERROR=3
ELSE IF PASSWORD=1 AND CODE>36 AND CODE<63 THEN
LET ERROR=4
END IF
PAUSE .005
LOOP UNTIL PASSWORD=10
IF ERROR=1 THEN
CALL ERROR_SYM
ELSE IF ERROR=2 THEN
CALL ERROR_NUM
ELSE IF ERROR=3 THEN
CALL UC_ENCRYPT
ELSE IF ERROR=4 THEN
CALL lc_ENCRYPT
END IF
PRINT
IF ERROR1>TERROR THEN
LET GOOD=0
LET ERROR1=0
CLEAR
CALL ESC_KEY
END IF
CALL END_ENCRYPT
LOOP UNTIL GOOD=TGOOD AND ERROR1<TERROR
LOOP UNTIL COMPLETE_EXIT=1
DATA 1,2,3,4,5,6,7,8,9,0 !1-10
DATA A,B,C,D,E,F,G,H,I,J !11-20
DATA K,L,M,N,O,P,Q,R,S,T !21-30
DATA U,V,W,X,Y,Z !31-36
DATA a,b,c,d,e,f,g,h,i,j !37-46
DATA k,l,m,n,o,p,q,r,s,t !47-56
DATA u,v,w,x,y,z !57-62
DATA "!",";","@","#","`" !63-67
DATA "%","^","&","$" !68-71
DATA "_","-","=","+" !72-75
DATA "~",".",",","'" !76-79
DATA S,Y,M,B,O,L,I,C !80-87
DATA N,U,M,E,R,I,C,A,L !88-96
DATA E,R,R,O,R !97-101
DATA E,F,F,E,C,T,I,V,E !102-110
DATA "(",U,C,")" !111-114
DATA "(",l,c,")" !115-118
DATA E,N,C,R,Y,P,T,I,O,N !119-128
DATA C,O,M,P,L,E,T,E !129-136
DATA F,I,L,E !137-140
SUB SCREEN_RESET
CLEAR
SET BACK "BLACK"
SET COLOR -1
FLOOD 25,25
SET COLOR 2
EXIT SUB
END SUB
SUB YES_NO_SUB
PRINT "ARE YOU SURE YOU WANT TO TEST FOR";TGOOD;"ACCESSIBLE FILES WITH"
PRINT "NO MORE THAN";TERROR;"COMPROMISED FILES?"
PRINT
PRINT "PRESS THE SPACEBAR TO CONTINUE OR BACKSPACE TO RESET THE PARAMETERES."
GET KEY YES_NO
DO
IF YES_NO=32 THEN
LET SURE=1
ELSE IF YES_NO=8 THEN
LET EXIT=0
LET SURE=0
CALL SCREEN_RESET
ELSE IF YES_NO<>32 AND YES_NO<>8 THEN
LET EXIT=0
LET SURE=0
EXIT IF
END IF
LOOP UNTIL SURE=1 OR SURE=0
END SUB
SUB ESC_KEY
SET COLOR 2
PRINT "PRESS THE (ESC) KEY AT ANYTIME TO STOP THE ENCRYPTION."
PRINT "ONLY PRESS THE (ESC) KEY ONCE OR YOU'LL EXIT THE PROGRAM."
PRINT
SET COLOR 2
PRINT "TESTING FOR";TGOOD;"ACCESSIBLE FILES WITH NO MORE THAN";TERROR;"COMPROMISED FILES."
PRINT
END SUB
SUB ENCRYPT_FILE_NUM
DO
LET EN=EN+1
LET ENCRYPT=118+EN
FOR I=1 TO ENCRYPT
READ Y$
NEXT I
PRINT Y$;
PAUSE .005
RESTORE
LOOP UNTIL ENCRYPT=128
PRINT " ";
DO
LET F=F+1
LET FILE=136+F
FOR I=1 TO FILE
READ Y$
NEXT I
PRINT Y$;
PAUSE .005
RESTORE
LOOP UNTIL FILE=140
RESTORE
LET ENCRYPT=0
LET EN=0
PRINT " ";TOTAL;"-> ";
END SUB
SUB ERROR_SYM
SET COLOR 9
LET ERROR1=ERROR1+1
PRINT ,
DO
LET S=S+1
LET SYMBOL=79+S
FOR I=1 TO SYMBOL
READ X$
NEXT I
PRINT X$;
PAUSE .005
RESTORE
LOOP UNTIL SYMBOL=87
RESTORE
PRINT " ";
DO
LET E=E+1
LET ERR=96+E
FOR I=1 TO ERR
READ X$
NEXT I
PRINT X$;
PAUSE .005
RESTORE
LOOP UNTIL ERR=101
PRINT ERROR1;"/";TERROR;
RESTORE
END SUB
SUB ERROR_NUM
SET COLOR 9
LET ERROR1=ERROR1+1
PRINT ,
DO
LET N=N+1
LET NUM=87+N
FOR I=1 TO NUM
READ X$
NEXT I
PRINT X$;
PAUSE .005
RESTORE
LOOP UNTIL NUM=96
RESTORE
PRINT " ";
DO
LET E=E+1
LET ERR=96+E
FOR I=1 TO ERR
READ X$
NEXT I
PRINT X$;
PAUSE .005
RESTORE
LOOP UNTIL ERR=101
PRINT ERROR1;"/";TERROR;
RESTORE
END SUB
SUB UC_ENCRYPT
SET COLOR 2
LET GOOD=GOOD+1
PRINT ,
DO
LET EF=EF+1
LET EFFECT=101+EF
FOR I=1 TO EFFECT
READ X$
NEXT I
IF EFFECT=111 THEN
PRINT " ";
END IF
PRINT X$;
PAUSE .005
RESTORE
LOOP UNTIL EFFECT=114
DO
LET EN=EN+1
LET ENCRYPT=118+EN
FOR I=1 TO ENCRYPT
READ X$
NEXT I
IF ENCRYPT=129 THEN
PRINT " ";
END IF
PRINT X$;
PAUSE .005
RESTORE
LOOP UNTIL ENCRYPT=136
PRINT GOOD;"/";TGOOD;
RESTORE
END SUB
SUB lc_ENCRYPT
SET COLOR 2
LET GOOD=GOOD+1
PRINT ,
DO
LET EF=EF+1
LET EFFECT=101+EF
FOR I=1 TO EFFECT
READ X$
NEXT I
PRINT X$;
PAUSE .005
RESTORE
LOOP UNTIL EFFECT=110
PRINT " ";
DO
LET EN=EN+1
LET ENCRYPT=114+EN
FOR I=1 TO ENCRYPT
READ X$
NEXT I
IF ENCRYPT=129 THEN
PRINT " ";
END IF
PRINT X$;
PAUSE .005
RESTORE
LOOP UNTIL ENCRYPT=136
PRINT GOOD;"/";TGOOD;
RESTORE
END SUB
SUB END_ENCRYPT
IF GOOD=TGOOD AND ERROR1=TERROR THEN
SET COLOR 2
LET ACCESS=GOOD+ERROR1
PRINT
PRINT "YOUR TEST SUCCESSFULLY CREATED";TGOOD;"FILES WITH NO MORE THAN";TERROR;"COMPROMISED FILES."
PRINT
PRINT "THE BELOW DATA IS A SUMMARY OF WHAT YOUR TEST COMPLETED"
CALL ENCRYPT_VALS
PRINT
PRINT "WOULD YOU LIKE TO RE-RUN THE PROGRAM OR END IT COMPLETELY?"
CALL REDO
CALL SCREEN_RESET
LET GOOD=TGOOD
LET ERROR1=TERROR-2
LET RESETALL=1
EXIT IF
ELSE IF KEY INPUT THEN
GET KEY CANCEL
IF CANCEL=27 THEN
SET COLOR 2
LET ACCESS=GOOD+ERROR1
PRINT
PRINT "YOU ENDED YOUR TEST PREMATURELY WITHOUT CREATING";TGOOD;"ACCESSBILE FILES AND"
PRINT "CREATING";ERROR1;"/";TERROR;"COMPROMISED FILES."
PRINT
PRINT "THE BELOW DATA IS A SUMMARY OF WHAT YOUR TEST MANAGED TO COMPLETE."
CALL ENCRYPT_VALS
PRINT
PRINT "ARE YOU SURE YOU WOULD LIKE TO END THE PROGRAM? OR WOULD YOU PREFER TO RE-RUN IT INSTEAD?"
CALL REDO
CALL SCREEN_RESET
LET GOOD=TGOOD
LET ERROR1=TERROR-2
LET RESETALL=1
EXIT IF
ELSE IF CANCEL<>27 THEN
EXIT IF
END IF
END IF
END SUB
SUB ENCRYPT_VALS
PRINT
PRINT "TOTAL FILES CREATED=";ACCESS
PRINT "TOTAL COMPROMISED FILES=";ERROR1;"/";ACCESS
PRINT "TOTAL COMPROMISED FILES CREATED OUT OF MAXIMUM COMPROMISED FILES ALLOWED=";ERROR1;"/";TERROR
PRINT "TOTAL ACCESSIBLE FILES=";GOOD;"/";ACCESS
PRINT "TOTAL ACCESSIBLE FILES CREATED OUT OF TOTAL DESIRED ACCESSIBLE FILES=";GOOD;"/";TGOOD
END SUB
SUB REDO
PRINT "PRESS THE SPACEBAR TO RE-RUN THE PROGRAM OR PRESS BACKSPACE TWICE TO END IT COMPLETELY."
DO
GET KEY REDO
IF REDO=32 THEN
LET COMPLETE_EXIT=0
EXIT IF
ELSE IF REDO=8 THEN
LET COMPLETE_EXIT=1
STOP
EXIT IF
ELSE IF RED0<>32 AND REDO<>8 THEN
EXIT IF
END IF
LOOP UNTIL REDO=32 OR REDO=8
END SUB
END