Jump to content
Sign in to follow this  


Recommended Posts


This is pretty much my first Example script in all the time i've been on this forum :mellow: So hope it goes down well

So basicly it just logs all String values that have been coped to the clipboard.

The clip entrys are then saved to an ini file along with a time stamp

Global Const $sLogFile = @ScriptDir & "\ClipLogger.ini" ;File to save the information to
Global $sLastClip = ""                                  ;a record of the previous clipboard entry

While Sleep(250)

;Checks to see if there has been a new clipboard entry.
Func _CheckClipboard()
    Local $sCurrentClip = ClipGet()
    If Not $sCurrentClip Then Return 0
    If $sCurrentClip <> $sLastClip Then
        $sLastClip = $sCurrentClip
EndFunc   ;==>_CheckClipboard

;Adds the clip entry to the file
Func _AddToLog($sValue)
    Local $hFile = FileOpen($sLogFile, 1)
    FileWriteLine($hFile, _Time() & " " & $sValue)
EndFunc   ;==>_AddToLog

;Returns the current time in HH:MM:SS format
Func _Time()
    Return @HOUR & ":" & @MIN & ":" & @SEC
EndFunc   ;==>_Time

;Reduce the memory used up by the script
;Thanks to jftuga for the idea behind this function
Func _ReduceMemory()
    Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1)
EndFunc   ;==>_ReduceMemory


Click here for the best AutoIt help possible.Currently Working on: Autoit RAT

Share this post

Link to post
Share on other sites

this is pretty cool..

altough.. Why would you want to use this?

Share this post

Link to post
Share on other sites

You can use this function _FileWriteLog().

When the words fail... music speaks

Share this post

Link to post
Share on other sites

There is a way to get notified when the clipboard changes. If you incorporate that it would be more impressive.

It is some function like SetClipboardViewer or some crap like that. Google it and play.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.