Re: Using AS to logout
Re: Using AS to logout
- Subject: Re: Using AS to logout
- From: "John C. Welch" <email@hidden>
- Date: Tue, 03 May 2005 18:37:22 -0500
On 5/3/05 18:20, "Christopher Nebel" <email@hidden> wrote:
> You know, I really wish people would stop recommending this sort of
> thing. This is what we call the "nuclear option" -- it will
> immediately terminate all user processes, giving them no chance to do
> any sort of cleanup.
Well, until this message, there's not been any documentation on a better
way.
>
> The answer to the original question is "sort of". All the supported
> ways of logging out will try to quit all running applications first,
> so it's still possible for an application to refuse to quit (either
> on its own, or because you pressed a "cancel" button) and therefore
> prevent the logout. However, you can avoid the initial confirmation
> ("do you really want to log out"), but you have to cheat a bit.
> While System Events is the scripting front end to all the "Power
> Suite" commands, the application that actually handles them is
> loginwindow. In addition, there's a fifth command that's not in the
> scripting dictionary; «event aevtrlgo», short for "really log out".
> It's the same as "log out", but doesn't let you confirm first.
> Therefore,
>
> tell application "loginwindow" to «event aevtrlgo»
>
> ...should do what you want, or as close to it as possible. Now that
> I think about it, "log out" ought to use that command, not the one
> that prompts first. I'll file a bug.
SWEET.
You made my week
--
Knife wounds inflicted on bodily extremities, such as hands, should receive
firm pressure with a clean, dry towel or cloth. Elevate if possible.
Remember, dry is the key. The wet washcloth is a poor choice for staunching
blood flow, no matter what you¹ve heard.
_______________________________________________
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