Skip to main content

Topic: PasteAsFile.vbs - Forum Utility (Read 13167 times) previous topic - next topic

PasteAsFile.vbs - Forum Utility
Attached is a VBScript utility to automate the transfer of nwctxt and clips directly from the Clipboard to NWC2. Copy all, or part of any Forum page to the Clipboard and run the utility. It will extract any clips or nwctxt found, create (or overwite) a file: "Clipboard.nwctxt", and launch the file into NWC2. Comments welcome.

Setup:

  • Download the attached file.

  • Remove the ".txt" extension.

  • Create a shortcut to it.

  • Change the shortcut's 'Start in:' folder to where you normally save *.nwc files. This is where "Clipboard.nwctxt" will be saved.



Usage:

  • Select some text. (usually from a Forum Topic page)

  • Copy to Clipboard.

  • Open (run) the Shortcut



A few test topics:



Notes: I use the Forum often, so I put my shortcut on the Favorites bar of IE8 as shown in the attachment. Anything you put in the 'Comment:' box of the shortcut becomes a Tool Tip.

To get the contents of the clipboard, the program uses the line:
  • e = CreateObject("htmlfile").parentWindow.clipboardData.getData("text")

This works in WinXP and IE8 with standard security settings. IE need not be your default browser but, some IE files must be present. If you cannot get this to work, and are willing to test some options, add a post to this topic and include your Windows version and browser version. I have other methods to access the Clipboard, including one that bypasses the browser completely.
  • Last Edit: 2012-01-25 10:44 pm by Rick G.
Registered user since 1996

Re: PasteAsFile.vbs - Forum Utility
Reply #1
Update to version 1.10

Added 2 optional commandline parameters:
  • /Copy
  • /CopyAll
    These will send Ctrl+C and Ctrl+A, Ctrl+C respectively to the keyboard.
    The shortcut must be placed in your browser for these to work properly.
    /CopyAll takes precedence over /Copy

    Code added to deal with new v2.1 clips. Examples: <here>.
  • Last Edit: 2010-03-08 01:07 pm by Rick G.
Registered user since 1996

Re: PasteAsFile.vbs - Forum Utility
Reply #2
Update to version 1.20

Added support for Version 2.5 Beta
Registered user since 1996

Re: PasteAsFile.vbs - Forum Utility
Reply #3
Update to version 1.25

Added support for Version 2.5 Beta Clips.
Registered user since 1996