http://www.perlmonks.org?node_id=283069


in reply to Clipboard transform keys

I can then run my transforms by copying the source info into the clipboard, hit the magic key, watch the black box of a command prompt flicker in and out of view (sometimes takes a second on NT, much quicker on Win2K), then paste the results.

If you're running with ActiveState perl, there's probably a registry entries for *.wsf files (look in the examples directory of perl). With the wsf you can get rid of the cmd box. Simply do:
<Job ID="MyClipCode"> <script language=PerlScript> # Your perl code here </script> </Job>
and voila! (but now strict and warning wont display too much help). update: i wrecked the whole thing with the code tags and pressed submit instead of preview... :o)

Replies are listed 'Best First'.
Re^2: Clipboard transform keys
by PhilHibbs (Hermit) on Aug 18, 2003 at 10:48 UTC
    I like to test the script in a Command Prompt, and often leave the debug output in place in case I feed my script something that I didn't anticipate. I'll give it a go though, I might find a middle-ground solution. I might even write and test them as raw perl scripts, and have another process that generates the .wsf file.
Re: Re: Clipboard transform keys
by John M. Dlugosz (Monsignor) on Sep 04, 2003 at 19:37 UTC
    Without the wsh stuff, you could run a regular perl file with the wperl.exe version of the interpreter instead. Define a file extension different from .pl or .perl (say, .wperl) if ActiveState didn't do that already.