Fr33b0w Posted June 2, 2010 Share Posted June 2, 2010 I simply dont understand how some basic stuff works. On the other hand I did wrote dozen of other scripts which worked just fine... This one should be simple... I am trying to make a file which will contain date and time in a moment its make... $filer = "@-------------========LAST-DOWNLOAD-" & @YEAR & "-" & @MON & "-" & @MDAY & "_-_" & @HOUR & "'" & @MIN & "'" & @SEC & "==========-------------.txt" _ClipPutFile($filer) Send("^v") File should be empty and in clipboard so i can paste it to a dir where I need to... How to make it work? Link to comment Share on other sites More sharing options...
ajag Posted June 2, 2010 Share Posted June 2, 2010 (edited) I simply dont understand how some basic stuff works. On the other hand I did wrote dozen of other scripts which worked just fine... This one should be simple... I am trying to make a file which will contain date and time in a moment its make... $filer = "@-------------========LAST-DOWNLOAD-" & @YEAR & "-" & @MON & "-" & @MDAY & "_-_" & @HOUR & "'" & @MIN & "'" & @SEC & "==========-------------.txt" _ClipPutFile($filer) Send("^v") File should be empty and in clipboard so i can paste it to a dir where I need to... How to make it work? Hi Fr33b0w, the clipboard can only contain a file that does exists. Try this: 1. mark a file in explorer 2. hit ctrl-c (for copy to clipboard) 3. delete the file 4. try to paste the file by hitting ctrl-c That will not work, since the file does not exists when doing the ctrl-c! So here is what you can do: #Include <Misc.au3> $filer = "@-------------========LAST-DOWNLOAD-" & @YEAR & "-" & @MON & "-" & @MDAY & "_-_" & @HOUR & "'" & @MIN & "'" & @SEC & "==========-------------.txt" FileWrite ( @TempDir & "\" & $filer, "" ) _ClipPutFile(@TempDir & "\" & $filer) Send("^v") A-Jay Edited June 2, 2010 by ajag Rule #1: Always do a backup Rule #2: Always do a backup (backup of rule #1) Link to comment Share on other sites More sharing options...
somdcomputerguy Posted June 2, 2010 Share Posted June 2, 2010 (edited) Is Misc.au3 included in the real code and just not in this post? If it's not, it needs to be. _ClipPutFile takes a path, not content, so the file already has to be created. That's another reason why it doesn't work. Edited June 2, 2010 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Fr33b0w Posted June 2, 2010 Author Share Posted June 2, 2010 Thanks Ajag it works! THANKS! THANKS! THANKS!!! 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