[PD] Turning on/off an installation

simon wise simonxwise at hotmail.com
Mon Jun 25 17:35:04 CEST 2007


On 24 Jun 2007, at 7:31 AM, Max Neupert wrote:

> here an example how to switch the computer off/to sleep from pd


the sleep script works nicely, but the logoff one fails -  "shut  
down" and "sleep" are valid for Finder in an Applescript, but "log  
out" isn't.

Another problem I have is that with [shell] I get an error dialogue  
saying "pd quit unexpectedly" when I use the examples in shell- 
help.pd - I guess it refers to the process triggered by [shell]  
ending, since pd continues on happily.

When I try your patch the system sleeps before pd can quit, it quits  
just after the system wakes up.

Adding "delay 5" to the start of the applescript doesn't help - it  
just adds a delay after wake up before pd quits, followed by the  
error dialogue.

Trying to split off the shell process by;

[& /Users/simon/sleep.app(
  |
[ggee/shell]

does not work, Console says the & isn't recognised (it's ok in  
Terminal) - pd quits, but sleep.app isn't run.

I guess [shell] isn't using the same shell as Terminal, it probably  
needs a bash script or a .command file or something similar to get a  
process split off so that it can keep going and let pd quit first.



I'm using autobuild: Pd-0.40.2-extended-2007-05-01 on OSX 10.4.8 and  
a G4 Powerbook

simon






More information about the Pd-list mailing list