On 26 Jun 2007, at 4:40 AM, Max Neupert wrote:
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
found them - they are under "System Events" but not "Finder"
tell application "System Events" log out end tell
now the script works properly, plus using
[open /Users/simon/sleep.app( | [ggee/shell]
works - Pd quits first, then the system sleeps or logs out or
whatever next.
The "pd quit unexpectedly" error message still gets displayed, it
seems to be a [shell] problem -
I seem to remember a thread about that a year or so ago - I'll search
for it, but it doesn't matter if I just want to log out or shut down
- thanks for that, my next installations will be cleaner!
Do you know a way (in OSX) to create Logout Items similar to Login
Items in the Accounts Preferences?
to set up timed events I've used CronniX from http://
www.abstracture.de/cronnix (easy + free GUI to create crontabs =>
schedule events eg the Applescripts above)
simon