Applescript question?

Discussion in 'Mac Apps and Mac App Store' started by anubis, Feb 27, 2005.

  1. anubis macrumors 6502a

    Feb 7, 2003
    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.

  2. HexMonkey Administrator


    Staff Member

    Feb 5, 2004
    New Zealand
    You can use the "do shell script" command to run a shell command, for example:
    do shell script "shutdown -h now"
    Alternatively, you could use:
    tell application "System Events" to shut down

Share This Page