Marlo Posted November 10, 2008 Share Posted November 10, 2008 This is pretty much my first Example script in all the time i've been on this forum 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 _ReduceMemory() While Sleep(250) _CheckClipboard() WEnd ;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 _AddToLog($sCurrentClip) $sLastClip = $sCurrentClip EndIf EndFunc ;==>_CheckClipboard ;Adds the clip entry to the file Func _AddToLog($sValue) Local $hFile = FileOpen($sLogFile, 1) FileWriteLine($hFile, _Time() & " " & $sValue) FileClose($hFile) 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 Comments? Click here for the best AutoIt help possible.Currently Working on: Autoit RAT Link to comment Share on other sites More sharing options...
ludocus Posted November 10, 2008 Share Posted November 10, 2008 this is pretty cool.. altough.. Why would you want to use this? Link to comment Share on other sites More sharing options...
Andreik Posted November 10, 2008 Share Posted November 10, 2008 You can use this function _FileWriteLog(). When the words fail... music speaks. Link to comment Share on other sites More sharing options...
LarryDalooza Posted November 10, 2008 Share Posted November 10, 2008 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. Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
wraithdu Posted November 10, 2008 Share Posted November 10, 2008 Here's my implementations, along with some other useful clipboard stuff.http://www.autoitscript.com/forum/index.php?showtopic=81267 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now