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 & HelpPrograms › Mouse Tracking and Background Applications
Page Index Toggle Pages: 1
Mouse Tracking and Background Applications (Read 1431 times)
Mouse Tracking and Background Applications
Jan 18th, 2010, 1:20pm
 
Hi,

I'm currently working on a networked mouse tracking piece of software that aggregates mouse movements across the studio. What I am keen to do is make a processing app that runs in the background but will continue to track mouse movements. When processing moves to the background the tracking of the mouse stops.

I've recently seen Anatoliy Zenkov's work on flickr (can't post a link as a newbie) which while written in Java rather than processing does something similar.

I realise that this is probably a "bad" behaviour (ie for sniffing keyboard hits and mouse movements) so is there a way to prompt the user on first launch etc?

Re: Mouse Tracking and Background Applications
Reply #1 - Jan 19th, 2010, 2:17am
 
This post might be a good place to start; though in your case the hack code can probably be condensed to:

Code:
Point mouse;
 
void setup() {
 size(100,100);
}

void draw(){
 mouse = MouseInfo.getPointerInfo().getLocation();  

 println( "mX is " + mouse.x + " and mY is " + mouse.y );
}


How do you plan to store the mouse tracking  Presumably a PGraphics object that's the size of the user's screen

As for privacy issues: I'm not sure I'd have too many concerns about my mouse movements being tracked - without corresponding information on what applications I had open and the positions of the windows I'm not sure you'd get a huge amount of sensitive information from it (keyboard logging however is a very different matter)...  And if the intention is for the sketch to be minimised, why not simply display a message in the sketch window itself...
Re: Mouse Tracking and Background Applications
Reply #2 - Feb 13th, 2010, 5:49pm
 
Hi!, i found too this project in flickr and i 'm really interesting about that idea to make in processing.

http://www.flickr.com/photos/anatoliy_zenkov/4271592758/

How was your project
Is there a posibility to launch an application processing without a window in background..
Page Index Toggle Pages: 1