Re: launch an application, and on quit, logout?
Re: launch an application, and on quit, logout?
- Subject: Re: launch an application, and on quit, logout?
- From: Luther Fuller <email@hidden>
- Date: Wed, 24 Jun 2009 14:55:07 -0500
On Jun 24, 2009, at 11:38 AM, Mike Stanley wrote: I am trying to do something that seems like it should be easy, but I must not be wording my searches correctly, because what I've mostly come up with is discussions of how to make a script quit apps and force a logout.
What I'm trying to do is make an applescript that I can place in a user's login items. What I'd like that script to do is:
1. Launch an application in the user's home area 2. Wait for that application to quit and when it does 3. Log the user out
Is that possible? If so, does anybody have anything they could share?
Easy! (I said to myself.) But it wasn't long before I found that all my ideas for logging out failed. Finally, I tried this ...
tell application "System Events" log out keystroke return end tell
It worked! But, you wanted more, which I don't know just now. You probably want to put the snippet above in an 'on quit' handler. If I discover more, I'll pass it along.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden