[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Clipboard manipulation module?



At 11.33 97/3/19, Gaspard Gendreau wrote:
>I would like to put the result of my Perl script in the clipboard, as
>plain text. I was wondering if someone has written something to do this.
>
>I have looked on CPAN, but I could not find things easily. Is it correct
>that the only way to access CPAN is via FTP?
>Isn't there a searchable archive via Web (preferably in Europe)?
>
>Thank-you.
>
>Gaspard


You need to get the file "clipboard.XFCN" (the MacPerl Primer page tells
you where).  Then put it in your lib or site_perl directory.  Then use a
subroutine like this:
#-----------------------------------------------------------------
sub setClip {
        package Dartmouth;
        &MacPerl::LoadExternals('clipboard.XFCN');
        package main;
        $blank = &Dartmouth::Clipboard();
        &Dartmouth::Clipboard($text);
}
#-----------------------------------------------------------------

#================================================================
Chris Nandor                                      pudge@pobox.com
PGP Key 1024/B76E72AD                           http://pudge.net/
Keyfingerprint = 08 24 09 0B CE 73 CA 10  1F F7 7F 13 81 80 B6 B6