Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #10755
    user
    Participant

    hello!

    is it possible to select multiple links and open all of them in default web browser with one click?

    thanks!

    #10759
    Yutaka Emura
    Keymaster

    No, but you should be able to write a macro to do this.

    Thanks!

    #10762
    user
    Participant

    would be easy for you to write one?

    thanks!

    #10929
    user
    Participant

    anyone please????

    #10932
    Stefan
    Participant

    user wrote:
    is it possible to select multiple links and open all of them in default web browser with one click?

    You can not do more then one selection at once.
    But you can use a script/macro to extract and collect all URLs
    and then use something like (For Each URL in URLs Do “open browser”)

     

    #10935
    Stefan
    Participant

     
     
    I have searched for an good regex to match url.
    An basic for an script could be:

    //Text to parse for URL:
    selText = document.selection.text;
    //
    //
    //Show matched URLs:
    vURLs = findUrls(selText);
    alert(vURLs);
    //
    //
    //Open matched URLs:
    vURLs = findUrls(selText);
    openUrls();
    function findUrls(searchText){
    // gruber revised expression - http://rodneyrehm.de/t/url-regex.html
    var regex= /b((?:[a-z][w-]+:(?:/{1,3}|[a-z0-9\%])|wwwd{0,3}[.]|[a-z0-9.-]+[.][a-z]{2,4}/)(?:[^s()<>]+|(([^s()<>]+|(([^s()<>]+)))*))+(?:(([^s()<>]+|(([^s()<>]+)))*)|[^s`!()[]{};:'".,<>?«»“”‘’]))/ig;
    result= searchText.match(regex);
    if(result){return result.join("rn");}else{return false;}
    }
    function openUrls(vURLS){
    var ie = new ActiveXObject("InternetExplorer.Application");
    ie.Visible = true;
    arr = vURLs.split("rn");
    for(i=0,E=arr.length; i<E; i++){
    vURL = arr[i];
    ie.Navigate(vURL);
    pause(1000);

    if(i==3) quit(); // for debugging only
    }
    }
    function pause(ms) {
    ms += new Date().getTime();
    while (new Date() < ms){}
    }

    This will open every url in IE but in same tab. Use History back.

    You may want to find a solution to open each url in a new tab.

    You can utilize other browsers maybe by using a code like:
    var wsh = new ActiveXObject(“WScript.Shell”);
    wsh.run(“notepad.exe”, 1, True);

     

    #10936
    user
    Participant

    wow, thanks!

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