I'm not sure what all those numbers you are using are. The following
works for me
(Ctrl-C file from Explorer), then
% set data [read_clipboard 15]; # 15 -> CF_HDROP
% close_clipboard
(copy something else to the clipboard to make sure the original file is
not persisted)
% open_clipboard
% empty_clipboard
% write_clipboard 15 $data
% close_clipboard
(Paste to some other directory in Explorer)
That works for me.
/Ashok
On 7/21/2023 6:35 PM, Manfred Stelzhammer wrote:
Hi
1. try:
I copy a file (.pdf) from Outlook.
I past this file to the filesystem.
Everything is ok.
2. try:
I copy a file (.pdf) from Outlook.
Now I run this small script.
## script start
package require twapi
proc test10 {} {
twapi::open_clipboard
foreach format [list 49342 49341 49365 49268] {
set data($format) [twapi::read_clipboard $format]
}
twapi::close_clipboard
twapi::open_clipboard
twapi::empty_clipboard
foreach format [array names data] {
twapi::write_clipboard $format [set data($format)]
}
twapi::close_clipboard
}
test10
### script end
In my opinion it should possible to paste this file to the filesystem, because in both cases the clipboard should have the same contents.
But it doesn't, why?
Regards
Manfred
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)