fb:porticula NoPaste
Tastaturtöne
Uploader: | Sebastian |
Datum/Zeit: | 20.07.2013 17:37:01 |
'Code von Sebastian, 20.07.2013, getestet unter W7 x64 Pro
#include "windows.bi"
dim as String keyboard = "QWERTZUIOPASDFGHJKLYXCVBNM"
dim as UByte numKeys = Len(keyboard)
dim As UInteger freqs(0 To numKeys-1)
dim as uinteger startFreq = 150
dim as uinteger delta = 75
for i as integer = 0 To numKeys-1
freqs(keyboard[i]-65) = startFreq + i*delta
next i
Dim as String keybInput
Dim As Ubyte keyCode
Dim As UInteger freq
Print "Buchstaben-Tasten ergeben Toene. Mit ESC wird das Programm beendet."
Do
keybInput = Inkey
If (keybInput <> "") Then
keyCode = ASC(UCASE(keybInput))
If ((keyCode >= 65) and (keyCode <= 90)) Then
freq = freqs(keyCode-65)
Beep_ (freq, 250)
End If
End If
Sleep 1
Loop Until keybInput = chr(27)
sleep