Morse-Hörtrainer, inklusive 1 Goto :D, korrigiert um ein End-# am 22.3.2013
[Blockierte Grafik: http://s2.postimg.org/8rf8w10qt/Screen_22_03_2013_20_Uhr_53_44_Sek.jpg]
Code
WindowTitle "Morse-Hörtrainer: NumPad +/- ClipBd:Text=* ESC=Reset"
WindowStyle 1048
Window 400,200
Font 2
Var m$=\
"A§.-#B§-...#C§-.-.#D§-..#E§.#F§..-.#G§--.#H§....#I§..#J§.---#K§-.-#L§.-..#"+\
"M§--#N§-.#O§---#P§.--.#Q§--.-#R§.-.#S§...#T§-#U§..-#V§...-#W§.--#X§-..-#"+\
"Y§-.--#Z§--..#0§-----#1§.----#2§..---#3§...--#4§....-#5§.....#6§-....#"+\
"7§--...#8§---..#9§----.#À§.--.-#ŧ.--.-#ħ.-.-#ȧ.-..-#ɧ..-..#Ö§---.#ܧ..--#"+\
"ߧ...--..#ѧ--.--#.§.-.-.-§(AAA)#,§--..--§(MIM)#:§---...§(OS)#"+\
";§-.-.-.§(NNN)#?§..--..§(IMI)#-§-....-#_§..--.-§(UK)#(§-.--.§(KN)#"+\
")§-.--.-§(KK)#'§.----.#=§-...-#+§.-.-.§(AR)Ende#/§-..-.§(DN)#@§.--.-.§(AC)#"+\
"[§-.--. -.--.#]§-.--.- -.--.-#{§---... -.--.#}§-.--.- ---...#!§.-.-.- -..-.#"+\
" § #<§-..-. ..--.-#>§..--.- -..-.#*§.-.-.-#"+chr$(34)+"§.-..-.#$§.-.-. .-.-."
Declare brk%,b!,a$,g$,s$,k&,j&,b$[],c$[],z$[],mc$[]
b$[]=explode(m$,"#")
Clear m$
WhileLoop 0,SizeOf(b$[])-1
Clear c$[]
c$[]=Explode(b$[&Loop],"§")
z$[&Loop]=c$[0]
Case SizeOf(c$[])>1:mc$[&Loop]=c$[1]
EndWhile
Clear c$[],b$[]
b!=0.666
rept:
locate 2,1
Print "Text = ";
Input a$
if a$="*"
a$="°"+GetClip$()
case len(a$)<4:a$="°"+"Das Clipboard war leer. Ersatztext: The quick brown fox jumps over the lazy dog. "
endif
a$=upper$(a$)
WhileLoop len(a$)
g$=mid$(a$,&Loop,1)
whileloop 0,sizeof(mc$[])-1
j&=&Loop
if g$=z$[j&]
case left$(a$,1)<>"°":print mc$[j&]+" ",
whileloop len(mc$[j&]+" §")
select mid$(mc$[j&]+" §",&Loop,1)
caseof "§"
waitinput 100
continue
caseof " "
waitinput 330*b!+120
k&=%key
if k&=27:brk%=1:break:cls:endif
if k&=45:b!=1.1*b!:print int(2000-b!*1000),:endif
if k&=43:b!=b!*0.9:print int(2000-b!*1000),:endif
continue
caseof "."
waitinput 40*b!
sound 880,60*b!
waitinput 30
continue
caseof "-"
waitinput 20*b!
sound 880,190*b!
waitinput 20
continue
endselect
endwhile
endif
case brk%:break
endwhile
case brk%:break
EndWhile
brk%=0
if left$(a$,1)="°":print:print right$(a$,len(a$)-1);:waitinput 7000:endif
waitinput 2200
cls
Goto "rept"
Alles anzeigen