GP SoftwareTwitter
Opus FAQsManualCommandsObjects

JScript Addin: BrowsersURLsShortcutsSandboxie


This JScript add-in creates five new DOpus commands to handle five related tasks. They deal with extracting URLs from a piece of text, creating *.url shortcut files from them, choosing and launching a browser that opens these URLs, and dealing with Sandboxie and multiple sandboxes. The Sandboxie options can be turned off, and do not appear if Sandboxie is not installed.

1. LaunchBrowser is a simple function to choose a browser and launch it either within a chosen sandbox or outside Sandboxie.

2. OpenURLsInClip extracts possible URLs from within a text clip, without redundancy. The user can then edit or save the list of URLs, or open a chosen browser inside a chosen sandbox or outside Sandboxie. For example, if a webpage has a number of URLs as hyperlinks, then copying the page source into the clipboard and running OpenURLsInClip will provide a list of all the URLs and the choice of opening them.

3. URLShortcutsFromClip begins the same way by extracting clips from text and offering the option to view or edit the list. Then each URL may or may not be saved to a *.url shortcut file, possibly in a sequence. Individual icons, or a default icon, can be provided for each shortcut file. An earlier version of this command is at [url]Button-script to create a .url file with icon from URL in clipboard]

4. OpenURLShortcuts opens *.url shortcut files with a chosen browser in a chosen sandbox.

5. ViewClip views "text" clips with the DOPus standalone viewer, views "files" clips with any CSV viewer, and attempts to open any other clip as a *.jpg file in the DOpus viewer.

Download the add-in below. Then go to Preferences - - > Toolbars - - > Scripts. Then drag the file into the list of add-in scripts.

The five commands mentioned above will now be available. But they need to be added as five separate buttons within the DOpus toolbars. They have no parameters.

You will need to configure the add-in by telling it your browsers, your Sandboxie sandboxes (optional), your preferred text editor and CSV viewer, and your favicon directory. Go to Preferences - - > Toolbars - - > Scripts, select this script BrowsersURLsShortcutsSandboxie, and click configure. There are many options, and each displays a short note below when highlighted.

  • Any number of browsers may be entered, together with an alias or command for each, although the script will need some simple editing at the beginning if any more than four are required. Aliases such as Firefox and IExplore, if they exist, are simpler than full paths to .exe or .lnk files. The command for the Edge Browser is still unclear.
  • Any number of sandboxes may be used (edit for more than four), or the Sandboxie options may be turned off.
  • Any text editor and any CSV viewer may be used, including most obviously Excel. Nirsoft has a simple CSV viewer at
  • The configuration assumes that favicons for *.url files will all be in the same directory, and asks for a default favicon.

Thanks very much to tbone for all sorts of help and advice, and particulary for the configuration helper at [url]Helper: ConfigHelper (easier config item handling)] Similar thanks to leo and jon for their encouragement and help.

Version 1.0, Julianon 17/09/15
BrowsersURLsShortcutsSandboxie.js.txt (90.8 KB)