Whoa, congratulations! It shows there went lots and LOTS of work into this sophisticated macro - and even with Help text. Great
Your new menu looks very nice and handy. And your example list too, all keywords together, and easy to copy from one profile to another. What a work...
Perhaps also include the necessary min KM-version, for users of older systems? (Like me, that means I haven't tried that macro in action yet, only taken a deeper look inside the file)
Regarding this main function: searchkeywords_DoSearch
Looks like it's always opening results in the same tab? Some users prefer new tabs, there's a setting somewhere too in F2... or perhaps just add a hint in the help text, for users to change open(url) into opentab(url) if they prefer.
Just one thing... That sentence is misleading:
Quote
Borut
"In K-M no web search keywords are initially defined - using search engines directly from the URL bar is not possible."
They are not initially defined, but that doesn't mean it were impossible. In fact K-Meleon always had a native way to define such search keywords, by adding them as "Nick" name to a bookmark or hotlist entry. The prob is of course, KM doesn't give users any hint about this, or other important things it can do! So everyone just believes it were impossible
I think those Nick-tricks are explained somewhere in the FAQ, but who studies that endless page (and partly obsolete anyway). And occasionally was mentioned in the forum.
But it must finally be made more obvious in the browser itself. It's overdue since ages that KM includes a few default keywords in the default bookmarks, for users to discover intuitively. BUT: it's 'only' GUI, not engine, sigh. That means no chance in KM. Just one of those age old probs, so unnecessary, so easy to fix, but never done just because it's 'only' GUI stuff and KM has no GUI-dev long since
And those default bookmarks are only a start, in a second step a hint in the bookmarks editor should be added too somehow, because most users import their own bookmarks and all defaults get lost. But that's more complicated. The extremely easy part is to just add a few search engines with nicks in the default bookmarks.html Or at the very least just the g-Nick to the already existing google search in there.
That's how this native but hidden gem works: the search engines must be defined as bookmarks, or as opera hotlist. And with
%s as placeholder for the search terms. And with the
keyword in the "Nick" field. That's all. Then typing e.g. "g xxxx" in the urlbar will open a google search for "xxxx"
There are no limits to such Nick shortcuts.
Any web address can be opened with a shortcut this way, with or without additional text, not just search engines.
Also any bookmarks/hotlist
Folders can get a Nick name too, that will
open all bookmarks in that folder at once, just by typing the Nick keyword in the urlbar and hit enter.
(_howto_ search keywords like opera urlbar nick folder)
Anyway, back to your macro.
This is the first (or second?) macro I'm aware of that makes full use of the 'new' functions methods. Am not familiar with this yet, so was very surprised to now discover code inside that looks like pure macrolanguage. So far had assumed 'functions' take only normal javascript. Intriguing that this works (You're now my expert for function macros
)
And thanks for teaching me a new syntax trick
Wasn't aware that even ancient KM1.x could already glue strings together across linebreaks, by simply using dots. Now seeing this method used in your macro over and over, finally got me wondering, and just tried it with a little test macro - bingo! Works great. So far always thought linebreaks in strings were only possible since KM75.
Edited 1 time(s). Last edit at 06/13/2019 02:29AM by siria.