• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: launch an application, and on quit, logout?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >launch an application, and on quit, logout? (From: Mike Stanley <email@hidden>)

  • Prev by Date: Re: list issues
  • Next by Date: Re: launch an application, and on quit, logout?
  • Previous by thread: Re: launch an application, and on quit, logout?
  • Next by thread: Re: launch an application, and on quit, logout?
  • Index(es):
    • Date
    • Thread