开发者

Pass clipboard to batch in Windows XP

开发者 https://www.devze.com 2022-12-11 12:19 出处:网络
Using Windows XP I want to copy text (URL) to the clipboard and then run a batch file that will use that URL.

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

I kn开发者_如何学Cow the reverse is possible with the clip.exe floating around.


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"
0

精彩评论

暂无评论...
验证码 换一张
取 消