Remotely Put Your Mac To Sleep From Your iPhone Using Drafts

Remotely Put Your Mac To Sleep From Your iPhone Using Drafts

Do you often forget to put your Mac to sleep before getting up and walking away? David Sparks shows off a clever way to remotely put it to sleep using Drafts, Dropbox and Hazel.

The basic premise here is incredibly simple:

  1. I type “MB sleep” in Drafts and save it to the standard Drafts folder on Dropbox. (In my case it is located at Dropbox/Apps/Drafts.) I use “MB sleep” because I’m going to add a second one for putting the iMac to sleep.
  2. Point Hazel at the Drafts folder and tell it to look for a file that contains the terms “MB sleep”
  3. When Hazel sees the file, it deletes it and runs an AppleScript to put the Mac to sleep.

This is a really simple script.
tell application “Finder”

sleep

end tell

Once you set this up, open Drafts and type “MB sleep” and save it to Dropbox. Within a few seconds, your Mac goes safely to sleep.

That’s it. Once you set it all up, you can send your Mac to sleep with a simple command. Really, any iOS text editor that saves to Dropbox will work, but Drafts makes it especially easy to do. Head over to MacSparky for a few more ways to automate this even more.

Put Your Mac to Sleep with iOS Drafts [MacSparky via The Instructional]


The Cheapest NBN 50 Plans

Here are the cheapest plans available for Australia’s most popular NBN speed tier.

At Lifehacker, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.

Comments