Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

anubis

macrumors 6502a
Original poster
How do I write an applescript to simply shut down the system?

I have an ATI Remote Wonder and want the power button on the remote to completely shut down my Mac. I can set up the remote software to launch any document or application when I press the power button on the remote. I want it to run an applescript that will execute the "shutdown -h now" command. Should be pretty simple (one to three liner), but i'm an applescript novice.

Help?
 
You can use the "do shell script" command to run a shell command, for example:
Code:
do shell script "shutdown -h now"
Alternatively, you could use:
Code:
tell application "System Events" to shut down
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.