I have text file - frequently modified - i want to create a button - when i click on it, this file will be copied to clipboard - i want paste this text to other application manually.
You can ignore that warning. The button uses @runmode hide so you shouldn't see it.
The warning is because the first line clears the clipboard and the second line is then run once per file to append each file to the clipboard. The first file will be appended to the empty clipboard and thus produce that warning.
If you're only ever going to use the button with one file then you could simplify it to just run SetClip -f {filepath$}
[quote]...and when i try to paste text in editor i get this:
"
˙ţA"[/quote]
I don't think SetClip understands Unicode text files so that might be the problem.
[quote="tbone"]Is it possible for you, to show us what is inside your clipboard-file ?!
Seems it is either empty or contains no valid ascii-data.[/quote]
This is: (in hex)
0D 0A FF FE 41
OK, now i know what is bad:
1.When i tried to put into clipboard file in DOS codepage, it will work
2.File "Fajne_teksty.txt" is encoded as "U-DOS" - unicode...
NirCmd looks like it does the same as SetClip, i.e. the input file has to be a "simple text file" and there's no way to specify the codepage and translate it into UTF-16 before setting the clipboard.
I'd like to add options to SetClip so that you can specify the codepage of the input file, and also make it auto-detect UTF-8 and UTF-16 when there is a BOM at the start of the file, but it might take me a while to find the time.