AppleScript: Remotely control your Mac with an e-mail

Have you ever been away from your Mac and wanted to shut down, restart, or needed to open an application remotely, but didn't have access to anything except your iPhone? Well, I am going to show you how to do these tasks with AppleScript and Mail. This process is fairly easy and involves creating a […]

Have you ever been away from your Mac and wanted to shut down, restart, or needed to open an application remotely, but didn't have access to anything except your iPhone? Well, I am going to show you how to do these tasks with AppleScript and Mail.

This process is fairly easy and involves creating a simple AppleScript and some Mail rules. Note that since these rules will cause your Mac to perform the listed action when they run, be careful when testing!

Continue reading to learn how to build this AppleScript.
Creating the AppleScripts

For this how-to, I am going to show you how to shutdown, restart, and sleep your Mac. Just copy the following scripts into the Script Editor.app (~/Applications/AppleScript/Script Editor.app).

Shutdown
tell application "Finder"
shut down
end tell

Restart
tell application "Finder" to restart

Sleep
tell application "Finder"
sleep
end tell

Saving your AppleScript

>Click File > Save and choose "Script" from the "File Format:" drop-down box. Remember where you save the .scpt file.

Full Article

Apple, Mac, MacBook, MacBook Pro, MacBook Air, iMac, AppleScript, Email