Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Windows' clipboard

by InfiniteSilence (Curate)
on Jul 31, 2001 at 22:57 UTC ( #101273=perlquestion: print w/ replies, xml ) Need Help??
InfiniteSilence has asked for the wisdom of the Perl Monks concerning the following question:

Hey, anybody know how to programmatically push some text into the Window's clipboard?

Celebrate Intellectual Diversity

Comment on Windows' clipboard
Re: Windows' clipboard
by RhetTbull (Curate) on Jul 31, 2001 at 23:09 UTC
    Look at the Win32::Clipboard module, available on CPAN. Straight from the docs:
    use Win32::Clipboard; $CLIP = Win32::Clipboard(); print "Clipboard contains: ", $CLIP->Get(), "\n"; $CLIP->Set("some text to copy into the clipboard");
Re: Windows' clipboard
by alftheo (Scribe) on Aug 01, 2001 at 13:36 UTC
    Here's my scripts:
    • toclip.cmd:
      @perl -MWin32::Clipboard -e "undef $/;$c=Win32::Clipboard(<>);" %*
    • fromclip.cmd:
      @perl -MWin32::Clipboard -e "$c=Win32::Clipboard();print $c->Get();"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://101273]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (19)
As of 2015-07-01 20:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (19 votes), past polls