jcunews

DispClip.hta

Jan 5th, 2021 (edited)
518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.74 KB | None | 0 0
  1. <!--
  2. DispClip v1.0.1
  3. https://www.reddit.com/u/jcunews1
  4. https://pastebin.com/u/jcunews
  5. https://greasyfork.org/en/users/85671-jcunews
  6.  
  7. Display clipboard contents into the standard output.
  8. For use within a console window, or with redirected output.
  9. Only works if the clipboard contains text.
  10. Does nothing if the clipboard doesn't contain any text.
  11.  
  12. Usage in Command Prompt e.g.:
  13.  
  14.  for /f "delims=" %A in ('mshta.exe "d:\tools\dispclip.hta"') do @echo %A
  15.  
  16. -->
  17. <hta:application windowstate=minimize />
  18. <script language=vbscript>
  19. on error resume next
  20. s = clipboarddata.getdata("text")
  21. if err.number = 0 then
  22.   if not isnull(s) then
  23.     createobject("scripting.filesystemobject").getstandardstream(1).write s
  24.   end if
  25. end if
  26. close
  27. </script>
  28.  
Add Comment
Please, Sign In to add comment