Jump to content

Recommended Posts

Posted

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?

Posted (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 by ajag

Rule #1: Always do a backup         Rule #2: Always do a backup (backup of rule #1)

Posted (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 by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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
×
×
  • Create New...