views:

285

answers:

2

using windows xp i want to copy text (url) to the clipboard then run a batch file that will use that url.

i know the reverse is possible with the clip.exe floating around.

A: 

I use my own CLIPTEXT program. It is a very simple 5-lines pascal, here is the source code. I am sure that you can get the idea and translate it to any other language.

program cliptext;
uses clipbrd;
begin
  writeln(clipboard.asText);  
end.

then, in your batch files, you may use to start the copied URLs.

for /f "tokens=*" %%c in ('cliptext') do start "" "%%c"
PA
ye, i wrote a small python script to the same end.
yoshco
A: 

Yesterday, Raymond Chen posted in his blog the new old thing this solution http://blogs.msdn.com/oldnewthing/archive/2009/11/10/9919908.aspx

PA
best answer i found was the standalone gclip @ Uxnutils package via a comments in Raymon's blog.
yoshco
This one only can put something *in* the clipboard, not the other way.
Joey
Raymond post explains documents *both* ways.
PA