DECLARE SUB lesson (arr$(), s, e) DECLARE FUNCTION dvorakin$ () 'convert from qwerty to dvorak 'Program Copyright 1999 John Bauman 'lessons themself are copyright by: Dan Wood 'freely distributable and modifiable for no profit products 'function dvorakin$ distributable and modifiable in other not for profit products CLS DIM arr$(53) DIM SHARED qw$(72)'load conversion data DIM SHARED dv$(72) FOR cop = 1 TO 35 * 2 READ qw$(cop) READ dv$(cop) IF dv$(cop) = CHR$(34) THEN dv$(cop) = "_" IF dv$(cop) = "\" + CHR$(34) THEN dv$(cop) = CHR$(34) NEXT FOR lessn = 1 TO 53 READ arr$(lessn) NEXT lessn = 1 ar = 0 PRINT "Welcome to the ABCD (converted) Dvorak touch typing teacher " PRINT "When given a lesson, always type what you see in below the star line" PRINT "Always press ESC to end the program" PRINT "Qwerty input until lesson" PRINT "Use saved lesson(y/n)?" s$ = INPUT$(1) IF s$ = "y" THEN INPUT "What is it's name"; name$ OPEN name$ FOR INPUT AS #1 INPUT #1, lessn CLOSE #1 ELSEIF s$ = CHR$(27) THEN END END IF PRINT "Did you change dos(not windows) to use dvorak?" conv$ = INPUT$(1) IF conv$ = "y" THEN ar = 1 IF conv$ = CHR$(27) THEN END FOR less = lessn TO 10 CLS SELECT CASE less CASE 1: e = 1: s = 8 PRINT "Lesson 1:U and H :Home Row,Index Fingers" CASE 2: e = 9: s = 16 PRINT "Lesson 2:E and T :Home Row,Second Fingers" CASE 3: e = 17: s = 24 PRINT "Lesson 3:Comprehensive" CASE 4: e = 25: s = 33 PRINT "Lesson 4:O and N :Home row,third fingers" CASE 5: e = 34: s = 53 PRINT "Lesson 5:Total Comprehensive" CASE 6: CASE 7: CASE 8: CASE 9: CASE 10: END SELECT CALL lesson(arr$(), e, s) NEXT '*************************** 'convert data DATA -,[,_,{,=,],+,} DATA q,',Q,\",w,",",W,<,e,.,E,>,r,p,R,P,t,y,T,Y,y,f,Y,F,u,g,U,G,i,c,I,C,o,r,O,R,p,l,P,L,[,/,{,?,],=,},+ DATA a,a,A,A,s,o,S,O,d,e,D,E,f,u,F,U,g,i,G,I,h,d,H,D,j,h,J,H,k,t,K,T,l,n,L,N,;,s,":",S,',-,\",_ DATA z,;,Z,":",x,q,X,Q,c,j,C,J,v,k,V,K,b,x,B,X,n,b,N,B,m,m,M,M,",",w,<,W,.,v,>,V,/,z,?,Z 'first lesson DATA uuuu hhhh uuuu hhhh uuuu hhhh uuuu hhhh DATA uuuu hhhh uuuu hhhh uuuu hhhh uuuu hhhh DATA uh uh uh uh DATA hu hu hu hu DATA huh huh huh huh DATA uh huh uh huh uh huh uh huh DATA h u uh hu uhh huh uhh DATA h u uh hu uhh huh uhh 'second lesson DATA eeee tttt eeee tttt eeee tttt eeee tttt DATA eeee tttt eeee tttt eeee tttt eeee tttt DATA et et et et DATA tee tee tee tee DATA tete tete tete tete DATA eet eet eet eet DATA t e et te teet tee teet tete et DATA t e et te teet tee teet tete et 'third lesson DATA eeee hhhh tttt uuuu DATA eeee hhhh tttt uuuu DATA eeee hhhh tttt uuuu DATA hue hue hue hue tutu tutu tutu tutu the the the the he he he he he DATA teeth teeth teeth teeth hut hut hut hut DATA thee thee thee thee tutu tutu tutu tutu DATA eh he hue hut teeth teethe the thee tutu DATA eh he hue hut teeth teethe the thee tutu '4th lesson DATA oooo nnnn oooo nnnn oooo nnnn oooo nnnn DATA oooo nnnn oooo nnnn oooo nnnn oooo nnnn DATA no no no no DATA on on on on DATA non non non non DATA noon noon noon noon DATA ono ono ono ono DATA no non noon on noo ono DATA no non noon on noo ono DATA eeee hhhh nnnn oooo tttt uuuu '5th DATA en en en en ho ho ho ho ne ne ne ne nu nu nu nu oh oh oh oh to to to to DATA hen hen hen hen hoe hoe hoe hoe hot hot hot hot Hun Hun Hun Hun DATA nee nee nee nee net net net net not not not not nun nun nun nun DATA nut nut nut nut one one one one out out out out ten ten ten ten DATA TNT TNT TNT TNT toe toe toe toe ton ton ton ton too too too too DATA tot tot tot tot tun tun tun tun DATA hone hone hone hone hoot hoot hoot hoot hunt hunt hunt hunt DATA neon neon neon neon none none none none note note note note DATA noun noun noun noun onto onto onto onto Otto Otto Otto Otto DATA teen teen teen teen tent tent tent tent then then then then DATA thou thou thou thou tone tone tone tone toot toot toot toot DATA tote tote tote tote tout tout tout tout tune tune tune tune DATA tenet tenet tenet tenet tenth tenth tenth tenth tooth tooth tooth tooth DATA Tune the tone DATA Note the teen not the tutu DATA Ten hot teeth tout the tune DATA The one nut to tote out the hen DATA None hunt out the tenth one ton nun DATA Hunt the neon then toot out the tune onto the tent FUNCTION dvorakin$ a$ = input$(1) FOR comp = 1 TO 72 IF a$ = qw$(comp) THEN a$ = dv$(comp) EXIT FOR END IF NEXT dvorakin$ = a$ END FUNCTION SUB lesson (arr$(), s, e) PRINT "Type in Dvorak" PRINT "**********************************************************" errors = 0 y = s totalchar = 0 stime = TIMER DO UNTIL y = e + 1 totalchar = totalchar + LEN(arr$(y)) LOCATE 4: PRINT SPACE$(80) LOCATE 4: PRINT arr$(y) LOCATE 5: PRINT SPACE$(80) FOR a = 1 TO LEN(arr$(y)) + 1 LOCATE 5, a: PRINT "_" IF ar = 0 THEN a$ = dvorakin$ ELSE a$ = INKEY$ END IF IF a$ = CHR$(8) THEN a = a - 1 ELSEIF a$ = CHR$(13) THEN LOCATE 5, a: PRINT " " a = a - 1 IF a = LEN(arr$(y)) THEN y = y + 1 EXIT FOR ELSE SOUND 440, 4.5 errors = errors + 1 END IF ELSEIF a$ = CHR$(27) THEN PRINT "(Qwerty)Do you wish to save?(y/n)" s$ = INPUT$(1) IF s$ = "y" THEN INPUT "What name?", nam$ OPEN nam$ FOR OUTPUT AS #1 PRINT #1, less CLOSE #1 END IF END ELSEIF a$ = MID$(arr$(y), a, 1) THEN LOCATE 5, a: PRINT a$ ELSEIF a$ <> MID$(arr$(y), a, 1) THEN SOUND 440, 4.5 a = a - 1 LOCATE 5, a + 1: PRINT " " errors = errors + 1 END IF NEXT LOOP tot = TIMER - stime totm = tot / 60 f = 1 / totm lpm = 60 / tot * totalchar PRINT PRINT "Lpm:"; lpm PRINT "Time:"; tot PRINT "Basic wpm:"; lpm / 6 PRINT "Errors:"; errors PRINT "Error percentage:"; 100 / 193 * errors k$ = INPUT$(1) END SUB