Skip to content

Instantly share code, notes, and snippets.

@ericlaw1979
Created February 18, 2021 16:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ericlaw1979/fa34e112a7f04c10ae57bfd5e29a4dc3 to your computer and use it in GitHub Desktop.
Save ericlaw1979/fa34e112a7f04c10ae57bfd5e29a4dc3 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