Quote
jsnj
I do think URL Bar contents should be searched for before selected text. Could be a change implemented in the next release maybe.
Search{
macroinfo=_("Consult the default search engine");
$_Search_EngineURL==""?$_Search_EngineURL=getpref(STRING,$_Search_pref_DefaultURL):0;
$_Search_EngineName==""?$_Search_EngineName=getpref(STRING,$_Search_pref_DefaultName):0;
$_Search_Query=$SelectedText; $_Search_Query==""?&_Search_Typed:&_Search_Selected;
$_Search_EngineName="";
$_Search_EngineURL="";
}
You can bring $URLBAR into focus. For example, replace the blue line with this code:
if($URLBAR!="" and $URLBAR!=getpref(STRING,"kmeleon.MRU.URL0")) {
$_Search_Query=$URLBAR; &_Search_Typed;
}else{
$_Search_Query=$SelectedText; $_Search_Query==""?&_Search_Typed:&_Search_Selected;
}
What is the purpose?
Quote
deadlock
The active element should be used.
If URL Bar has focus, it should not
use selected.openurl.
Any idea how to get that value?
It is impossible, because macrolanguage does not detect active or focused element. Focus depends on how you set the function.
In the Search() function $SelectedText is in focus (blue code). That's it, in search.kmm you do not have anything to add or delete.
Regards.