 |
 |
Is there an Applescript to Restart a computer?
|
 |
|
 |
|
Mac Enthusiast
Join Date: Mar 2001
Location: ~
Status:
Offline
|
|
I'm curious from anyone if there is an Applescript available that will just simply restart the computer, that can be made into a standalone 'applet' that can be placed into the Dock and run from there. I've set up a computer for my grandfather and want a way to easily restart the machine - I'm thinking this might be a good way. As odd as it may sound to you and me, having him find The Apple Menu and locate Restart... is a chore, so I think this might be a good interim method.
Any input or pointers to site that have specific Applescripts available?
thanks in advance,
Kent M
|

kent m is not a member of any public groups
|
| |
|
|
|
 |
|
 |
|
Baninated
Join Date: Dec 2004
Location: Illinois might be cold and flat, but at least it's ugly.
Status:
Offline
|
|
Originally Posted by kent m
I'm curious from anyone if there is an Applescript available that will just simply restart the computer, that can be made into a standalone 'applet' that can be placed into the Dock and run from there. I've set up a computer for my grandfather and want a way to easily restart the machine - I'm thinking this might be a good way. As odd as it may sound to you and me, having him find The Apple Menu and locate Restart... is a chore, so I think this might be a good interim method.
Any input or pointers to site that have specific Applescripts available?
thanks in advance,
Kent M
Maybe try this?
Scheduled restart, shutdown, or sleep with AppleScript
Wed, Mar 29, 2000; by Jeremy Reichman.
The Finder, at least as of Mac OS 9 (and probably extending back to Mac OS 8.5; I haven't checked) includes commands to restart, shutdown, and sleep the computer.
This can be handy if you have specific needs to do these things that don't fit into the schedule of the Energy Saver control panel — or, as in my case, don't work when set through that control panel. (The latest Apple "New World" hardware and latest OSes seem to be particularly problematic.)
You can create a simple script such as:
tell application "Finder"
restart
end tell
... and that script will restart the computer, just as if you had chosen "Restart" from the Finder's Special menu.
Substitute "shut down" or "sleep" for "restart," and you can do any of those commands, as well.
Couple this with iDo. Create your script, save it as a script application, and add it to the schedule in the iDo Script Scheduler control panel (version 1.1 or later lets you add script applications, earlier versions required compiled scripts). Set the options for the script to activate.
Voila! You have a safe, reliable method of commanding your Mac to restart, shut down, or sleep. That method bypasses the sometimes balky Energy Saver mechanisms, and it's free!
http://macsetup.editthispage.com/stories/storyReader$31
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Aug 2005
Location: Delray Beach, FL
Status:
Offline
|
|
Since you mention the dock, I assume you are running OS X. There is no Special Menu in OS X finder. There are no "control panels" in OS X.
these comments aside, the above script will work.
save it as an application and drag it to the dock...
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Mar 2001
Location: ~
Status:
Offline
|
|
Oh this s exactly it. Thanks very much! So simple.
Originally Posted by budster101
tell application "Finder"
restart
end tell
...and that's exactly what I did - saved this as app and dragged it into the Dock.
thanks and best regards,
Kent M
|

kent m is not a member of any public groups
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|