• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Inhibiting Sleep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inhibiting Sleep


  • Subject: Re: Inhibiting Sleep
  • From: Paul Berkowitz <email@hidden>
  • Date: Wed, 12 Jun 2013 12:12:36 -0700
  • Thread-topic: Inhibiting Sleep

Title: Re: Inhibiting Sleep
I've been curious to see if you tried theDaniel's method which seemed to give you control over the period of time to suspend sleep, supposedly without needing (or, at least, it didn't consider) the error stuff. Did you give it a try?

--
Paul Berkowitz



From: Luther Fuller <email@hidden>
Date: Wed, 12 Jun 2013 13:46:25 -0500
To: AppleScript-Users <email@hidden>
Subject: Re: Inhibiting Sleep

I used …

do shell script "pmset noidle >/dev/null 2>&1 & echo $!"

as suggested by Paul Scott and it works correctly.

I have a number of scripts that use a variant of this …

set soundpid to do shell script "afplay " & soundPath & " &> /dev/null & echo $!"

and have never encountered any problem, so I also tried this …

do shell script "pmset noidle >/dev/null & echo $!"

But the script does not work correctly without the "2>&1".

Can someone wearing a unix hat explain when "2>&1"
should and should not be used?





_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Inhibiting Sleep
      • From: Luther Fuller <email@hidden>
References: 
 >Re: Inhibiting Sleep (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Inhibiting Sleep
  • Next by Date: Re: Inhibiting Sleep
  • Previous by thread: Re: Inhibiting Sleep
  • Next by thread: Re: Inhibiting Sleep
  • Index(es):
    • Date
    • Thread