Pass clipboard to batch in Windows XP

2019-02-20 06:50发布

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.

3条回答
不美不萌又怎样
2楼-- · 2019-02-20 07:07

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

查看更多
该账号已被封号
3楼-- · 2019-02-20 07:09

Use {{!CLIPBOARD}} command or you can also visit this page

查看更多
聊天终结者
4楼-- · 2019-02-20 07:13

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"
查看更多
登录 后发表回答