Pass clipboard to batch in Windows XP
Asked Answered
G

1

1

Using Windows XP I want to copy text (URL) to the clipboard and then run a batch file that will use that URL.

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

Grateful answered 9/11, 2009 at 22:43 Comment(0)
G
1

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"
Goshen answered 10/11, 2009 at 10:2 Comment(1)
ye, i wrote a small python script to the same end.Grateful

© 2022 - 2024 — McMap. All rights reserved.