Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #27537
    Werner
    Participant

    Tools > 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!

    #27538
    tuska
    Participant

    $(CurText)
    ?

    #27542
    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!
    }

    #27550
    LTT
    Participant

    In 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.)

    #27553
    Werner
    Participant

    Wonderful that works, thank you very much

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.