[PD] Turning on/off an installation
Max Neupert
abonnements at revolwear.com
Mon Jun 25 20:40:13 CEST 2007
Am 25.06.2007 um 11:35 schrieb simon wise:
>
> 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.
first i think you need to activate UI-Scripting.
http://www.apple.com/applescript/uiscripting/01.html
you'll have in your “System events” applescript library a “power
suite” folder with
log out
restart
shut down
sleep
then also you need to make a .app out of the script i've sent in the
last mail by saving it in the Scripteditor
>
> 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 think you should do
[open /Users/simon/sleep.app(
|
[shell]
More information about the Pd-list
mailing list