# How to force chrome to open a link?

**URL:** <https://discourse.processing.org/t/how-to-force-chrome-to-open-a-link/31617>\
**Category:** Coding Questions\
**Created:** [August 7, 2021, 6:58pm UTC](https://discourse.processing.org/t/how-to-force-chrome-to-open-a-link/31617 "2021-08-07T18:58:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Post date:** [August 7, 2021, 6:58pm UTC](https://discourse.processing.org/t/how-to-force-chrome-to-open-a-link/31617/1 "2021-08-07T18:58:26Z")

</div>

Hi! I have been using a website that takes forever to load and has several other issues. I want to generate links and force them to open in browser. How can I do it (preferably in processing). I would prefer for it to be editable, since there is a start point for generating.  
Thank you!

---

<div class="post-metadata">

**Author:** ![micuat](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micuat/32/19407_2.png) [@micuat](https://discourse.processing.org/u/micuat)\
**Post date:** [August 9, 2021, 8:22am UTC](https://discourse.processing.org/t/how-to-force-chrome-to-open-a-link/31617/2 "2021-08-09T08:22:49Z")

</div>

I’m afraid that the question is not clear… do you want to show hyperlinks on a Processing sketch?

[https://processing.org/examples/embeddedlinks.html](https://processing.org/examples/embeddedlinks.html)

---

<div class="post-metadata">

**Author:** ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Post date:** [August 9, 2021, 10:37am UTC](https://discourse.processing.org/t/how-to-force-chrome-to-open-a-link/31617/3 "2021-08-09T10:37:13Z")

</div>

thank you for replying. I want to create a sketch that when run opens n links in browser. The links numbered, so whenever I run them, I need to specify where to start. So if I put 200 and n=5, it will open 200,201,202,203,204. (in format: [www.randomWeb.com/content/page/c-[number]](http://www.randomWeb.com/content/page/c-%5Bnumber%5D))

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [September 5, 2021, 8:30pm UTC](https://discourse.processing.org/t/how-to-force-chrome-to-open-a-link/31617/4 "2021-09-05T20:30:35Z")

</div>

For reference, here is an example that loads three pages from Project Guttenberg corresponding to three sequential id books:

```auto
/**
 * BatchLinkOpener
 * 2021-09-05 Jeremy Douglass - Processing 3.5.4
 * https://discourse.processing.org/t/how-to-force-chrome-to-open-a-link/31617
 */
String baseurl="https://www.gutenberg.org/ebooks/";
int start = 1341;
int count = 3;

void setup() {
  for(int i=0; i<count; i++) {
    // DO NOT call link in draw unless you are very careful --
    // if you spawn 60+ tabs per second your browser may freeze.
    link(baseurl + str(start+i));
  }
}

```

As the snippet says, DO NOT call `link()` from `draw()` unless you are extremely careful. You can nuke your browser and potentially freeze your desktop if you accidentally start spawning 60+ tabs per second from your sketch. Handle with care.
