<?xml version="1.0" encoding="windows-1252"?>
<node id="284526" title="Re^2: Clipboard transform keys" created="2003-08-18 06:15:01" updated="2005-08-13 12:43:07">
<type id="11">
note</type>
<author id="280965">
PhilHibbs</author>
<data>
<field name="doctext">
Here's the script that transforms an URI into a HTML link:
&lt;code&gt;@rem = '--*-Perl-*--
@echo off
perl -x -S "%~dpnx0" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
@rem ';
#!perl
#line 8
use strict;
use warnings;
use HTML::Entities;
use Win32::Clipboard;
my $CLIP = Win32::Clipboard();
my $text = $CLIP-&gt;GetText;
if (substr($text,0,1) ne '&lt;') {
   chomp $text;
   $text = encode_entities($text);
   $CLIP-&gt;Set('&lt;a href="'.$text.'"&gt;&lt;/a&gt;');
}
__END__
:endofperl
&lt;/code&gt;&lt;strong&gt;Update:&lt;/strong&gt;Uses HTML::Entities to translate &amp; to &amp;amp;amp; etc.</field>
<field name="root_node">
281123</field>
<field name="parent_node">
283934</field>
</data>
</node>
