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

script for rebooting

How do I make a script to reboot my mac and when I have will I be able to simply doble click the script as an icon and have it perform the action?

MacBook, Mac OS X (10.5.1)

Posted on Feb 20, 2008 11:23 AM

Reply
8 replies

Feb 20, 2008 11:31 AM in response to smithrj

Well I found one online that logs me out:

set theMessage to "Logout of the computer?
This will quit all applications and you will be prompted to save any unsaved documents.

Note, please respond to any dialog prompts until the computer is completely logged out."

display dialog theMessage giving up after 15 buttons {"Logout", "Cancel"} default button "Logout"
if button returned of the result is "Cancel" then
return
else
do shell script "touch /tmp/logoutNow"
ignoring application responses
tell application "loginwindow" to «event aevtrlgo»
end ignoring
end if

May 9, 2008 10:26 AM in response to spazek

well what I did originally was to download a pre-made scrip from a university that logged out the user, I then gave this script and Icon (the real reason for wanting this feature at all) and then placed it on my dock - a single click to log out. But now I want a definite reboot or shut down, both (separately) but cannot fin the page the scripts were on.

script for rebooting

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