erikson Posted November 22, 2009 Share Posted November 22, 2009 hi i have a script that write me into a file, the content of clibboard, when that content changes. i whant to put a counter on that the content of that file to be something like this: 1 line content blah blah 2 line 2 content etc etc 3 line 3 content the the problem is that i dont`k know how to make the script to count the actions i atach a piece of script that make the filewrite Func MY_DEL() Local $timer ConsoleWrite("Old clip: " & ClipGet() & @CRLF) _Clipboard_Wait('ClipPut("")') $timer = TimerInit() _Clipboard_Wait('Send("^c")') MsgBox(0, "", "Waited: " & TimerDiff($timer) & @CRLF & @CRLF & ClipGet(),1) $file="c:\raport.txt" $ordin=1 FileOpen ($file, 1) filewrite ($file ,ClipGet()) FileWrite ($file,@CRLF & @crlf) FileClose ($file) cand anybody give me a hint? Link to comment Share on other sites More sharing options...
Valik Posted November 22, 2009 Share Posted November 22, 2009 cand anybody give me a hint?Here's a hint. Try posting on the correct forum next time. The examples forum is not where you ask for support. Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 25, 2009 Share Posted November 25, 2009 cand anybody give me a hint?Just create a Global variable (i.e. Global $iCount = 0) that you can increment and write to the file as required. If this count has to be kept across executions of the script, you could read the file to find the last count then increment, or keep it in a separate .ini file, or keep it in a registry key, etc., etc.. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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