Jump to content
Sign in to follow this  
DaLiMan

Keylog and Speak

Recommended Posts

Hi There,

I want to create a sort of keylogger which speaks the typed keystrokes back to you. I found a nice script (I thought from MHz) here for speaking text (see below) but I'm not familiar with keylogging so I don't know how to begin.

This is for testing with a nearly blind colleague.

Can anyone please get me started?

_Say('Just got to love the new Autoit beta COM features')

Func _Say($text)
    $talk = ObjCreate('SAPI.SpVoice')
    If Not @error Then $talk.Speak($text)
EndFunc

Share this post


Link to post
Share on other sites

http://www.autoitscript.com/forum/index.php?showtopic=10688

This should help you..whenever you read a key, you _Say it..and it should work perfectly..you just need to delete alot from the original script..have phun and post the final script here, so I can too..:)..

<{POST_SNAPBACK}>

This great, Already have it speaking to me.

But why does it say "n" when I type a "t"??

And there a some more mis-spellings by the program.

Also, HOW CAN I SHUT IT DOWN !!!

Any bug fixers out there?

Edited by Jos
CODE REMOVED

Share this post


Link to post
Share on other sites

DaLiMan,

Here's another way to have the computer say the names of keys that are pressed.

I might use this technique to quickly play sound effects for shows.

Dave

; This script will play an audio file that names the letter or number key pressed.
; The period key will also be announced.
; A second script using the same technique and running at the same time 
; could pronounce additional characters.

; Before running this script, create WAV files for a-z, A-Z, and 0-9 in a folder named c:\sounds.
; Maybe use higher-pitch WAVs for capital letters A-Z.
; Maybe generate WAV files by recording output of Excel's text-to-speech feature reading a column of characters.
; WAV files for "period" and "terminated" are also required. 
; Press Shift-ESC to exit.
; That covers the maximum number of HotKeys for one script, which is 64.

; The WAV files are played by the functions
; that are called when the corresponding HotKeys are pressed.

; You can put the sounds in a different folder if you change the
; code that refers to c:\sounds.

; File names should be 
; a.wav through z.wav
; AA.wav through ZZ.wav
; 0.wav through 9.wav
; period.wav
; terminated.wav

; Note: To enter consecutive CAPITAL letters, you have to press the shift key
; for each letter separately. If you hold down the shift key, the "CAPITAL"
; sound will play for only the first letter that you type.

; This script does not set or detect the CAPSLOCK state.

; Set HotKeys
; First thing in quotes is the HotKey. Second thing in quotes is the function name
; that plays the WAV file that says what key was pressed.

; Press Shift-ESC to terminate
HotKeySet("+{ESC}", "Terminate")

; Lowercase letters
HotKeySet("a", "a")
HotKeySet("b", "b")
HotKeySet("c", "c")
HotKeySet("d", "d")
HotKeySet("e", "e")
HotKeySet("f", "f")
HotKeySet("g", "g")
HotKeySet("h", "h")
HotKeySet("i", "i")
HotKeySet("j", "j")
HotKeySet("k", "k")
HotKeySet("l", "l")
HotKeySet("m", "m")
HotKeySet("n", "n")
HotKeySet("o", "o")
HotKeySet("p", "p")
HotKeySet("q", "q")
HotKeySet("r", "r")
HotKeySet("s", "s")
HotKeySet("t", "t")
HotKeySet("u", "u")
HotKeySet("v", "v")
HotKeySet("w", "w")
HotKeySet("x", "x")
HotKeySet("y", "y")
HotKeySet("z", "z")

; Uppercase letters
; Function names are not case-sensitive, so double letter names are required.

HotKeySet("+a", "AA")
HotKeySet("+b", "BB")
HotKeySet("+c", "CC")
HotKeySet("+d", "DD")
HotKeySet("+e", "EE")
HotKeySet("+f", "FF")
HotKeySet("+g", "GG")
HotKeySet("+h", "HH")
HotKeySet("+i", "II")
HotKeySet("+j", "JJ")
HotKeySet("+k", "KK")
HotKeySet("+l", "LL")
HotKeySet("+m", "MM")
HotKeySet("+n", "NN")
HotKeySet("+o", "OO")
HotKeySet("+p", "PP")
HotKeySet("+q", "QQ")
HotKeySet("+r", "RR")
HotKeySet("+s", "SS")
HotKeySet("+t", "TT")
HotKeySet("+u", "UU")
HotKeySet("+v", "VV")
HotKeySet("+w", "WW")
HotKeySet("+x", "XX")
HotKeySet("+y", "YY")
HotKeySet("+z", "ZZ")

; Numbers and period
; Function names can't start with a numeral, so use an "x" before the numeral.

HotKeySet("0", "x0")
HotKeySet("1", "x1")
HotKeySet("2", "x2")
HotKeySet("3", "x3")
HotKeySet("4", "x4")
HotKeySet("5", "x5")
HotKeySet("6", "x6")
HotKeySet("7", "x7")
HotKeySet("8", "x8")
HotKeySet("9", "x9")
HotKeySet(".", "period")

; Do nothing but sleep while processing hotkeys that are typed in other applications.
While 1
    Sleep(100)
WEnd

; The rest of this script consists of all the functions 
; that are called by the hotkeys.

; Lowercase letters

Func a()
    SoundPlay("c:\sounds\a.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("a")
    Send("a")
; turn hotkey back on
    HotKeySet("a", "a")
EndFunc
 
Func b()
    SoundPlay("c:\sounds\b.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("b")
    Send("b")
; turn hotkey back on
    HotKeySet("b", "b")
EndFunc
 
Func c()
    SoundPlay("c:\sounds\c.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("c")
    Send("c")
; turn hotkey back on
    HotKeySet("c", "c")
EndFunc
 
Func d()
    SoundPlay("c:\sounds\d.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("d")
    Send("d")
; turn hotkey back on
    HotKeySet("d", "d")
EndFunc
 
Func e()
    SoundPlay("c:\sounds\e.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("e")
    Send("e")
; turn hotkey back on
    HotKeySet("e", "e")
EndFunc
 
Func f()
    SoundPlay("c:\sounds\f.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("f")
    Send("f")
; turn hotkey back on
    HotKeySet("f", "f")
EndFunc
 
Func g()
    SoundPlay("c:\sounds\g.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("g")
    Send("g")
; turn hotkey back on
    HotKeySet("g", "g")
EndFunc
 
Func h()
    SoundPlay("c:\sounds\h.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("h")
    Send("h")
; turn hotkey back on
    HotKeySet("h", "h")
EndFunc
 
Func i()
    SoundPlay("c:\sounds\i.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("i")
    Send("i")
; turn hotkey back on
    HotKeySet("i", "i")
EndFunc
 
Func j()
    SoundPlay("c:\sounds\j.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("j")
    Send("j")
; turn hotkey back on
    HotKeySet("j", "j")
EndFunc
 
Func k()
    SoundPlay("c:\sounds\k.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("k")
    Send("k")
; turn hotkey back on
    HotKeySet("k", "k")
EndFunc
 
Func l()
    SoundPlay("c:\sounds\l.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("l")
    Send("l")
; turn hotkey back on
    HotKeySet("l", "l")
EndFunc
 
Func m()
    SoundPlay("c:\sounds\m.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("m")
    Send("m")
; turn hotkey back on
    HotKeySet("m", "m")
EndFunc
 
Func n()
    SoundPlay("c:\sounds\n.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("n")
    Send("n")
; turn hotkey back on
    HotKeySet("n", "n")
EndFunc
 
Func o()
    SoundPlay("c:\sounds\o.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("o")
    Send("o")
; turn hotkey back on
    HotKeySet("o", "o")
EndFunc
 
Func p()
    SoundPlay("c:\sounds\p.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("p")
    Send("p")
; turn hotkey back on
    HotKeySet("p", "p")
EndFunc
 
Func q()
    SoundPlay("c:\sounds\q.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("q")
    Send("q")
; turn hotkey back on
    HotKeySet("q", "q")
EndFunc
 
Func r()
    SoundPlay("c:\sounds\r.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("r")
    Send("r")
; turn hotkey back on
    HotKeySet("r", "r")
EndFunc
 
Func s()
    SoundPlay("c:\sounds\s.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("s")
    Send("s")
; turn hotkey back on
    HotKeySet("s", "s")
EndFunc
 
Func t()
    SoundPlay("c:\sounds\t.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("t")
    Send("t")
; turn hotkey back on
    HotKeySet("t", "t")
EndFunc
 
Func u()
    SoundPlay("c:\sounds\u.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("u")
    Send("u")
; turn hotkey back on
    HotKeySet("u", "u")
EndFunc
 
Func v()
    SoundPlay("c:\sounds\v.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("v")
    Send("v")
; turn hotkey back on
    HotKeySet("v", "v")
EndFunc
 
Func w()
    SoundPlay("c:\sounds\w.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("w")
    Send("w")
; turn hotkey back on
    HotKeySet("w", "w")
EndFunc
 
Func x()
    SoundPlay("c:\sounds\x.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("x")
    Send("x")
; turn hotkey back on
    HotKeySet("x", "x")
EndFunc
 
Func y()
    SoundPlay("c:\sounds\y.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("y")
    Send("y")
; turn hotkey back on
    HotKeySet("y", "y")
EndFunc
 
Func z()
    SoundPlay("c:\sounds\z.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("z")
    Send("z")
; turn hotkey back on
    HotKeySet("z", "z")
EndFunc
 

; Uppercase letters


Func AA()
    SoundPlay("C:\sounds\AA.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+a")
    Send("+a")
; turn hotkey back on
    HotKeySet("+a", "AA")
EndFunc

Func BB()
    SoundPlay("C:\sounds\BB.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+b")
    Send("+b")
; turn hotkey back on
    HotKeySet("+b", "BB")
EndFunc

Func CC()
    SoundPlay("C:\sounds\CC.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+c")
    Send("+c")
; turn hotkey back on
    HotKeySet("+c", "CC")
EndFunc

Func DD()
    SoundPlay("C:\sounds\DD.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+d")
    Send("+d")
; turn hotkey back on
    HotKeySet("+d", "DD")
EndFunc

Func EE()
    SoundPlay("C:\sounds\EE.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+e")
    Send("+e")
; turn hotkey back on
    HotKeySet("+e", "EE")
EndFunc

Func FF()
    SoundPlay("C:\sounds\FF.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+f")
    Send("+f")
; turn hotkey back on
    HotKeySet("+f", "FF")
EndFunc

Func GG()
    SoundPlay("C:\sounds\GG.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+g")
    Send("+g")
; turn hotkey back on
    HotKeySet("+g", "GG")
EndFunc

Func HH()
    SoundPlay("C:\sounds\HH.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+h")
    Send("+h")
; turn hotkey back on
    HotKeySet("+h", "HH")
EndFunc

Func II()
    SoundPlay("C:\sounds\II.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+i")
    Send("+i")
; turn hotkey back on
    HotKeySet("+i", "II")
EndFunc

Func JJ()
    SoundPlay("C:\sounds\JJ.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+j")
    Send("+j")
; turn hotkey back on
    HotKeySet("+j", "JJ")
EndFunc

Func KK()
    SoundPlay("C:\sounds\KK.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+k")
    Send("+k")
; turn hotkey back on
    HotKeySet("+k", "KK")
EndFunc

Func LL()
    SoundPlay("C:\sounds\LL.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+l")
    Send("+l")
; turn hotkey back on
    HotKeySet("+l", "LL")
EndFunc

Func MM()
    SoundPlay("C:\sounds\MM.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+m")
    Send("+m")
; turn hotkey back on
    HotKeySet("+m", "MM")
EndFunc

Func NN()
    SoundPlay("C:\sounds\NN.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+n")
    Send("+n")
; turn hotkey back on
    HotKeySet("+n", "NN")
EndFunc

Func OO()
    SoundPlay("C:\sounds\OO.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+o")
    Send("+o")
; turn hotkey back on
    HotKeySet("+o", "OO")
EndFunc

Func PP()
    SoundPlay("C:\sounds\PP.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+p")
    Send("+p")
; turn hotkey back on
    HotKeySet("+p", "PP")
EndFunc

Func QQ()
    SoundPlay("C:\sounds\QQ.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+q")
    Send("+q")
; turn hotkey back on
    HotKeySet("+q", "QQ")
EndFunc

Func RR()
    SoundPlay("C:\sounds\RR.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+r")
    Send("+r")
; turn hotkey back on
    HotKeySet("+r", "RR")
EndFunc

Func SS()
    SoundPlay("C:\sounds\SS.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+s")
    Send("+s")
; turn hotkey back on
    HotKeySet("+s", "SS")
EndFunc

Func TT()
    SoundPlay("C:\sounds\TT.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+t")
    Send("+t")
; turn hotkey back on
    HotKeySet("+t", "TT")
EndFunc

Func UU()
    SoundPlay("C:\sounds\UU.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+u")
    Send("+u")
; turn hotkey back on
    HotKeySet("+u", "UU")
EndFunc

Func VV()
    SoundPlay("C:\sounds\VV.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+v")
    Send("+v")
; turn hotkey back on
    HotKeySet("+v", "VV")
EndFunc

Func WW()
    SoundPlay("C:\sounds\WW.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+w")
    Send("+w")
; turn hotkey back on
    HotKeySet("+w", "WW")
EndFunc

Func XX()
    SoundPlay("C:\sounds\XX.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+x")
    Send("+x")
; turn hotkey back on
    HotKeySet("+x", "XX")
EndFunc

Func YY()
    SoundPlay("C:\sounds\YY.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+y")
    Send("+y")
; turn hotkey back on
    HotKeySet("+y", "YY")
EndFunc

Func ZZ()
    SoundPlay("C:\sounds\ZZ.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("+z")
    Send("+z")
; turn hotkey back on
    HotKeySet("+z", "ZZ")
EndFunc
 

; Numerals


Func x0()
    SoundPlay("c:\sounds\0.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("0")
    Send("0")
; turn hotkey back on
    HotKeySet("0", "x0")
EndFunc
 
Func x1()
    SoundPlay("c:\sounds\1.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("1")
    Send("1")
; turn hotkey back on
    HotKeySet("1", "x1")
EndFunc
 
Func x2()
    SoundPlay("c:\sounds\2.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("2")
    Send("2")
; turn hotkey back on
    HotKeySet("2", "x2")
EndFunc
 
Func x3()
    SoundPlay("c:\sounds\3.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("3")
    Send("3")
; turn hotkey back on
    HotKeySet("3", "x3")
EndFunc
 
Func x4()
    SoundPlay("c:\sounds\4.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("4")
    Send("4")
; turn hotkey back on
    HotKeySet("4", "x4")
EndFunc
 
Func x5()
    SoundPlay("c:\sounds\5.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("5")
    Send("5")
; turn hotkey back on
    HotKeySet("5", "x5")
EndFunc
 
Func x6()
    SoundPlay("c:\sounds\6.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("6")
    Send("6")
; turn hotkey back on
    HotKeySet("6", "x6")
EndFunc
 
Func x7()
    SoundPlay("c:\sounds\7.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("7")
    Send("7")
; turn hotkey back on
    HotKeySet("7", "x7")
EndFunc
 
Func x8()
    SoundPlay("c:\sounds\8.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("8")
    Send("8")
; turn hotkey back on
    HotKeySet("8", "x8")
EndFunc
 
Func x9()
    SoundPlay("c:\sounds\9.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet("9")
    Send("9")
; turn hotkey back on
    HotKeySet("9", "x9")
EndFunc
 
Func period()
    SoundPlay("c:\sounds\period.wav")
; Turn off hotkey temporarily so letter can be sent.
    HotKeySet(".")
    Send(".")
; turn hotkey back on
    HotKeySet(".", "period")
EndFunc

Func Terminate()
    Exit
EndFunc
Edited by davelf

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...