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 › self closing processing window...
Page Index Toggle Pages: 1
self closing processing window... (Read 566 times)
self closing processing window...
Mar 7th, 2006, 10:51am
 
Hi there,

I'm using processing to run psychology experiments and am trying to figure out a way to run a processing program, close it when it terminates, and to then run another processing program.

Anyone any ideas on how to close a processing program automatically when it ends? Also, is there a way to make a processing script automatically run without having to click the play button? (Guess I should check out the Export Application function!)

My thoughts are to use an old fashioned DOS bat file to sequentially open my processing programs.  But would welcome other suggestions.

Thanks in advance for any ideas.  Andy.
Re: self closing processing window...
Reply #1 - Mar 7th, 2006, 12:55pm
 


Here's an answer to one of my questions:

To close a processing window, check out this discussion

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Programs;action=display;num=1140487452

Specifically, frame.setVisible(false);  acts to kill the processing window.

Still stumped on how to run another program before quitting the current program though.  

Cheers, Andy.
Re: self closing processing window...
Reply #2 - Mar 7th, 2006, 3:42pm
 
call exit() to make the program quit, and open() to launch another application (or file or whatever). open takes a String for the full path name of the thing you want to launch.
Re: self closing processing window...
Reply #3 - Mar 7th, 2006, 4:01pm
 
Thanks for that.  Works a treat.  You've made my life a lot easier!  Andy.
Page Index Toggle Pages: 1