#27541
Werner
Participant

with $(CurText) it’s the same problem.

JavaScript Macro:
#title=”Search engine”
#tooltip=”Search”,1031
if (document.selection.Text !=”) {
var string = document.selection.Text;
string = string.replace(/ /gi, “%20”);
alert(string);
var url = ‘https://www.bing.com/search?q=’ + string;
window.open(url, ‘w’); // not work!
}