Skip to content

Instantly share code, notes, and snippets.

@zlovatt
Last active July 6, 2021 16:53
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 zlovatt/1d071967c9c18b12944bc7a13f931f55 to your computer and use it in GitHub Desktop.
Save zlovatt/1d071967c9c18b12944bc7a13f931f55 to your computer and use it in GitHub Desktop.
Extendscript: Get Clipboard Contents (Windows only)
// This will get the clipboard contents directly as a string
var clipboardContents = system.callSystem("cmd /c \"for /f \"eol=; tokens=* delims= \" %I in ('powershell Get-Clipboard') do @set CLIPBOARD_TEXT=%I && echo %I\"");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment