Skip to content

Instantly share code, notes, and snippets.

@DDRBoxman
Forked from ericlaw1979/TypeTheClipboard.vbs
Created April 7, 2022 00:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DDRBoxman/e38603bf090e188de76b2fe8ae37b3b0 to your computer and use it in GitHub Desktop.
Save DDRBoxman/e38603bf090e188de76b2fe8ae37b3b0 to your computer and use it in GitHub Desktop.
Types the contents of the clipboard to the focused text area three seconds after invocation (useful for using sites/apps that block CTRL+V paste). Useful as a script launched from [SlickRun](https://bayden.com/slickrun)
set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Sleep 3000
'Hackery to get the clipboard's contents
Set objHTML = CreateObject("htmlfile")
text = objHTML.ParentWindow.ClipboardData.GetData("text")
WshShell.SendKeys text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment