I'm bit of a noob so please bear with me. I'm trying to open a lot of urls in internet explorer at once. About 40 urls.
I have an array of my urls and I'm using the following code:
for (int i = 0; i < urls.length; i++){
java.awt.Desktop.getDesktop().browse(java.net.URI.create(urls[i]));
}
This works perfectly if I already have IE open. However if it's not open already it creates 40 new windows not tabs. I have tried to get around it by using the following:
for (int i = 0; i <= 9; i++){
java.awt.Desktop.getDesktop().browse(java.net.URI.create(urls[i]));
try {
Thread.currentThread().sleep(200);
} catch (InterruptedException ex) {
Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);
}
}
How to open a URL in a new tab (and not a new window) using JavaScript? Opening of a URL in a new tab depends on the browser and the user's browser preferences. There is nothing you can do in code to force open a link strictly in a new tab.
If a URL matches an Auto URL Exception string, it will not be opened in IE Tab even if the URL also matches an Auto URL. The format for Auto URL Exceptions is the same as the format for Auto URLs. See above.
You can also open an URL from the Start Process action but this might open in another IE window rather than a Tab (if that's fine with you) in which case you need not bother much about the Launch/Detach. Then Attach to this new IE window using the same approach as above. Post back what you come up with. Click to expand...
Now navigate to any page and click on the IE Tab icon to open the page with the IE rendering engine. That's it! Right-click on the IE Tab icon and select "Options" to see all of the options, including the Auto URLs.
200, is just too small, i have tryed 1000 and it was also too small, but 2000 was OK. And of course, open the first one, then wait, and then open all the others at once.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With