- AuthorPosts
- June 16, 2021 at 4:10 am #27537
Werner
ParticipantTools > External Tools > Customize Tools > Properties > Arguments
Arguments:
https: //www. bing.com/search?q=$(SelText)When I select a word, a browser window opens with a tab.
If I select two words, a browser window opens with two tabs!I would always have to insert %20 characters for multiple words:
Hello%20World!June 16, 2021 at 10:05 am #27538tuska
Participant$(CurText)
?June 17, 2021 at 6:29 am #27542Werner
ParticipantWith $(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!
}June 17, 2021 at 9:12 pm #27550LTT
ParticipantIn Arguments, just add quotation marks around the url.
Or, if you want to open the url with your default browser, just put the url in Command instead. (Don’t add quotation marks.)
June 17, 2021 at 11:52 pm #27553Werner
ParticipantWonderful that works, thank you very much
September 19, 2021 at 5:11 pm #27541Werner
Participantwith $(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!
}September 19, 2021 at 5:11 pm #27543tuska
ParticipantCommand:
https://www.bing.com/search?q=$(CurText)
works here.September 19, 2021 at 5:11 pm #27544tuska
Participant2nd attempt at an answer:
Command: https://www.bing.com/search?q=$(CurText) works here. - AuthorPosts
- You must be logged in to reply to this topic.