Re: logout hook and AppleScripts
Re: logout hook and AppleScripts
- Subject: Re: logout hook and AppleScripts
- From: Matt Neuburg <email@hidden>
- Date: Thu, 20 Apr 2006 11:04:26 -0700
- Thread-topic: logout hook and AppleScripts
On Mon, 17 Apr 2006 23:59:15 -0700, Donald Hall <email@hidden> said:
>I want to have the ability to run an arbitrary set of scripts (both
>AppleScript and shell) when the user logs out. From reading the Apple
>documentation and the archives of this list, it looks like a "logout
>hook" for the loginwindow application is the way to go. The
>documentation is a little sparse, so I am wondering if anyone can
>point out the pitfalls and gotchas to me. It looks like the logout
>hook must be a shell script, but that shell script can then launch
>another application (a script runner in my case) to run the scripts.
>I assume loginwindow waits for the logout hook script to return
>before resuming the logout procedure. (What then happens to any
>application it launches?)
>
>I tried to do something with the quit handler of my current
>AppleScript based script runner (i.e. determine that Quit is being
>sent by the logout procedure and then run my scripts), but as it is a
>background application it is unceremoniously killed after being sent
>a Quit message, so the results are extremely unreliable.
>
>Thanks for sharing any experiences,
If I were you I would not count on being able to "launch another
application", since everything has pretty much been torn down by the time
the logout hook runs. However, one can but try, so go right ahead. I use
iHook, which makes installation of logout hooks pretty much trivial.
Furthermore it makes it very easy to provide other end-users with
instructions for installation of logout hooks.
<http://rsug.itd.umich.edu/software/ihook/>
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden