• 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: Luther Fuller <email@hidden>
  • Date: Tue, 11 Jun 2013 15:42:20 -0500

On Jun 11, 2013, at 3:06 PM, Lists wrote:

On Jun 11, 2013, at 12:09 PM, Luther Fuller <email@hidden> wrote:

Does anyone know of a simple command that will temporarily inhibit sleep for a short time?
(I would not like to change any defaults.)

In Terminal you can use:

pmset noidle

Unsure of how you would use it in a "do shell script" though.

There's nothing to do but to test. I added this to my script …

try
do shell script "pmset noidle" --****************
on error errtext number errNr
"Error = " & errNr & return & errtext
display dialog the result
end try


display dialog "Begin time out ..."

The do shell script line halts the script. I can see in Activity Monitor that 'pmset' is running.
I wait awhile, then ...
When I quit 'pmset' via Activity Monitor,
I get the error message dialog,
then I get the "Begin time out …" dialog

Either this will not work or more is needed in the do shell script line.



 _______________________________________________
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: theDaniel <email@hidden>
References: 
 >Inhibiting Sleep (From: Luther Fuller <email@hidden>)
 >Re: Inhibiting Sleep (From: Lists <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