"Paste" is a matter of the application. The most likely and general way is to use Win32::GUITest and send a CTRL+V key combination to its window. But maybe you just want File::Copy?
| [reply] [d/l] |
Paste to where? If you want to paste to or copy from your own app, you can probably do something with Win32::Clipboard. Otherwise, you'll have to figure out some way to access the other app (and if it's an app with multiple "paste points" you'll have to select the right target within the app too).
| [reply] |
Ok might as well cut to the chase. This is what I'm trying to do specifically. I want to export an embedded ole to a scrap file. I can copy the ole to the clipboard programmatically in the program which the ole is embedded in. Then if I right click the windows desktop and select paste the ole is made into a scrap file on the desktop. Now I want to be able to do this programmatically as well in perl. Preferably to a directory.
| [reply] |
find out what win32 api calls are involved first
| [reply] |
#!/usr/bin/perl
use warnings;
use strict;
use Tk;
use Tk::Clipboard;
my $mw = tkinit;
$mw->withdraw; #use Tk without showing a window
my $content = 'foobar'.time;
print "$content\n";
$mw->clipboardClear;
$mw->clipboardAppend($content);
MainLoop;
| [reply] [d/l] |