[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Logout w/o alert panel
Dear list,
I manage to solve this problem by using AppleEvent, not by
AppleScript.
After killing Terminals by kill signal then sending kAEQuitApplication
event to Finder, at last sending kAEQuitAll event to loginwindow makes
logout without alert panel gracefully.
I feel AppleEvent is simple and mighty (may causing security hole B-).
> Now I'm doing some user managing solution. Due to its specification,
some background task monitors user's session time, when it reaches
end, the task should force user to logout. Is such a function
possible?
>
> Two questions arise:
> First, how to tell Finder to logout.
> Second, how to tell Finder not to show logout alert panel.
>
> AppleScript seems to be usable to Finder to sleep, but when I sent
quit to Finder, it relaunched. Sending kill signal to Finder, too.
>
> Sending kill signal to loginwindow seems to make whole system
unstable.
>
> Any hints are appreciated!
>