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.
Page Index Toggle Pages: 1
Shutdown OSX (Read 633 times)
Shutdown OSX
May 8th, 2008, 8:14am
 
Hello. I have a question that I have been juggling but have hit a blind corner. I am setting up a turnkey application with processing for a 2 week art show. The piece turns will turn on the computer in the morning, load my processing application in "present mode", and then shut down the application at the end of the day. Everything is working smooth except for shutdown. OSX tries to do the automatic shutdown, but because Processing is running in Present mode, it cancels the shutdown procedure and stays on (leaving processing doing its thing).

My question is if anyone knows how to bypass this, perhaps by automatically shutting down the application a couple minutes before the system shuts down or is some other brilliant way.

I just had a thought... can processing get the current system time? If so is there a "close application" function within processing?

Any help would be much appreciated!!

Cheers,

nooboon
Re: Shutdown OSX
Reply #1 - May 8th, 2008, 10:40am
 
you could do something like:

Code:
if(hour()==18 && minute()==0) //6pm
{
exit();
//exits without cleanup, I can never remember the
//clean way to shut down...
}
Re: Shutdown OSX
Reply #2 - May 8th, 2008, 12:00pm
 
Hi, you can also use 2 Applescripts to be launched at a certain time.

1 for starting up, 1 to close the app.
Page Index Toggle Pages: 1