Code Revisions 2. Embed What would you like to do? Embed Embed this gist in your website. Share Copy sharable link for this gist. Learn more about clone URLs. Download ZIP. VBScript to save clipboard contents to a text file. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters Show hidden characters. Copy link. Doesn't work. Microsoft doesn't give a way for VBScript to directly access the clipboard.
If you do a search for 'clipboard' on this site you'll see:. Therefore, VBScript does not allow you to access such useful objects as the mouse pointer or the clipboard. You can, however, use the Err object to provide runtime error handling for your applications.
How can I use Clipboard in vbscript? Update for visitors The solution I ended up using was to compile the C itself, I did not know I already had a compiler. CreateObject "WScript. Shell" WshShell. Run "cmd. Here's a code snippit Outp. Application" ie. GetData "text" EDIT: I use this snippet to put text back on the clipboard, but it needs third party software; a standalone executable 'clip.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.
Related Hot Network Questions. Question feed.
0コメント