[Perl]获取剪切板文件列表

There's more than one way to do it!
https://metacpan.org http://perlmonks.org
回复
头像
523066680
Administrator
Administrator
帖子: 573
注册时间: 2016年07月19日 12:14
联系:

[Perl]获取剪切板文件列表

帖子 523066680 »

use Win32::Clipboard;
use IO::Handle;
use Time::HiRes 'sleep';
STDOUT->autoflush(1);

print "Select files, then copy to clipboard\n";

my $clip = Win32::Clipboard;
$clip->Empty();
my @files;

while (1)
{
sleep 0.3;
print ".";
@files = $clip->GetFiles();

if ( $files[0] ne "" )
{
print join "\n", @files;
$clip->Empty();
last;
}
}
回复

在线用户

正浏览此版面之用户: 没有注册用户 和 4 访客