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 15:16:48 -0500
Here's a script that seems to do what you want. I'm using Mail here only as an example.
on run tell application "Mail" to activate repeat tell application "System Events" to if not (exists process "Mail") then exit repeat end repeat end run
on quit tell application "System Events" log out keystroke return end tell continue quit end quit
I compiled to an application bundle with Stay Open = false. When this application is launched, Mail is also launched. When Mail is quit, you go to the login screen. I did not test by adding this application to my Accounts Login Items, but I'm sure it will work ... I've done this before with no problems.
|
_______________________________________________
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