Viewing 8 posts - 1 through 8 (of 8 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

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

    #27543
    tuska
    Participant

    Command:
    https://www.bing.com/search?q=$(CurText)
    works here.

    #27544
    tuska
    Participant

    2nd attempt at an answer:
    Command: https://www.bing.com/search?q=$(CurText) works here.

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