I've used quicksearches in Firefox for ages (and before that the same feature in Netcaptor). For the uninitiated, these allow you to type shortcuts to search engines into the location bar in your browser.
Amongst others, I have Google setup as a quick search in FF. This allows me to type "g opus" into the location bar to search google for "opus", for example. Very handy, saves loading the entire search page first and most search engines lend themselves to this functionality. Firefox (and other browsers) simply let you create a bookmark to the search url for the site in question, using %s as a placeholder for your search terms.
Here's my bookmark properties for the google quick search:
You can see that the keyword is 'g' and the url has '%s' in the place where the search engine requires the search terms.
Using the {dlgstring} argument we can use this idea in Opus. Easily creating a toolbar button or even a global hotkey which will prompt the user for search terms, and then launch their default browser with the results.
<?xml version="1.0"?>
<button display="label" effect="gray">
<label>Google</label>
<icon1>84</icon1>
<function type="normal">
<instruction>"https://www.google.com/search?q={dlgstring|Enter search term/s}"</instruction>
</function>
</button>
Alternatively, you may want to search for the selected filename/folder instead of your own typed terms. The following button will use the first selected file or folders name.
<?xml version="1.0"?>
<button display="label" effect="gray">
<label>Google</label>
<icon1>84</icon1>
<function type="normal">
<instruction>"https://www.google.com/search?q={file}"</instruction>
</function>
</button>
(Edit: From 12.23.2 and above, replace {file}
with {file|urlencode}
for better handling of spaces and symbols in file names.)
This method can be used with a lot of different search engines, including:
- Google Images:
https://images.google.com/images?q=%s
- Wikipedia:
https://en.wikipedia.org/wiki/Special:Search?search=%s
- Dictionary:
https://dictionary.reference.com/search?q=%s
- IMDB:
https://www.imdb.com/Find?for=%s&select=All
Probably best suited for floating toolbars or global hotkeys you may find this a quick and easy way to search the internet.