# Running multiple interact sketches

**URL:** <https://discourse.processing.org/t/running-multiple-interact-sketches/16044>\
**Category:** Coding Questions\
**Created:** [December 2, 2019, 3:43pm UTC](https://discourse.processing.org/t/running-multiple-interact-sketches/16044 "2019-12-02T15:43:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![otji](https://avatars.discourse-cdn.com/v4/letter/o/919ad9/32.png) [@otji](https://discourse.processing.org/u/otji)\
**Post date:** [December 2, 2019, 3:43pm UTC](https://discourse.processing.org/t/running-multiple-interact-sketches/16044/1 "2019-12-02T15:43:27Z")

</div>

Hi there,  
I am beginning to use P5.JS to create a small experience and one of the things i’m trying to do is to have a sketch that runs another sketch when an icon is clicked. I’m pretty sure this is a basic function but I can’t seem to find information about it.

Thank you in advance

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [December 2, 2019, 3:56pm UTC](https://discourse.processing.org/t/running-multiple-interact-sketches/16044/2 "2019-12-02T15:56:09Z")

</div>

[https://github.com/bmoren/p5.localmessage](https://github.com/bmoren/p5.localmessage) is a lib  
what might allow to run 2 browser windows with p5.js sketch on one computer  
and communicate.

but for a start that window could try just a LINK  
[https://p5js.org/reference/#/p5/createA](https://p5js.org/reference/#/p5/createA)  
use the `target="_blank"` attribute

---

<div class="post-metadata">

**Author:** ![otji](https://avatars.discourse-cdn.com/v4/letter/o/919ad9/32.png) [@otji](https://discourse.processing.org/u/otji)\
**Post date:** [December 2, 2019, 5:09pm UTC](https://discourse.processing.org/t/running-multiple-interact-sketches/16044/3 "2019-12-02T17:09:25Z")

</div>

Hi there ! thank you very much for answering.  
The action is indeed really simple : clicking on square in sketch 1 open and plays sketch 2 in different window. So yeah, a link !  
Thanks again have a good evening
