Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

logout prompt/ change log out dialog

Hi All,


I was wondering if somebody could help me. I would like to run a script when a user selects log out from the apple drop down to ask the user if they backed up their data before it allows them to log out. I created a script that prompts you and then brings you to the logout screen but do not know how to get it to run, or something similar to run, when you select log out. Obviously, I do not want it to run when the user has already logged out..


The other option I see that could work would be to change the message, "are you sure you want to quit all applications and log out now?" which I cannot figure out how to do.


Any help would be greatly appreciated


Thanks,

Marissa

AppleScript-OTHER, Mac OS X (10.6.8)

Posted on Apr 23, 2012 7:44 AM

Reply
3 replies

Apr 23, 2012 10:19 AM in response to mzelmano22

By the way the script is:


tell application "Finder" to display dialog "Please Backup Your Data


There is a risk of data loss if the machine experiences a hardware failure or an accident occurs" buttons {"Log Out", "Cancel"} default button "Cancel" with icon stop


if button returned of result is "Log Out" then

tell application "System Events"


log out

end tell

end if

logout prompt/ change log out dialog

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.