We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › input mouse/key - control 2 sketches
Page Index Toggle Pages: 1
input mouse/key - control 2 sketches (Read 306 times)
input mouse/key - control 2 sketches
Nov 3rd, 2008, 9:49am
 
Hallo everybody!

I am almost new to processing and not able to solve my problem. I want to run 2 processing sketches at the same time and give them at the same time an input with a mouseclick or by pressing a key. I just learned by reading the message board that normaly the sketch window has to be activate! Isn t there any simple solution to run 2 sketches, one in front and the other in the back und control them at the same time! Thanks for your answers

David
Re: input mouse/key - control 2 sketches
Reply #1 - Nov 7th, 2008, 10:17pm
 
Obviously, you can't share a mouse click or a keystroke among two distinct windows...
If you need to share events, the window receiving them must send them to the other window, perhaps using some network protocol.

You might want to use Network library, or perhaps oscP5 (I haven't used it yet).

[EDIT] Actually, there is already two sketches in the examples, doing precisely that: SharedCanvasServer and SharedCanvasClient.
Page Index Toggle Pages: 1