• 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: TImer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TImer


  • Subject: Re: TImer
  • From: "email@hidden" <email@hidden>
  • Date: Fri, 25 Sep 2009 08:27:13 -0700

This could be done in applescript but it would be kind of klunky.

Something like:

set currentTime to current date
set shutdownTime to currentTime + 5.5 * minutes
set timeTOShutDown to shutdownTime - currentTime
set countdownStart to timeTOShutDown - 5 * minutes
delay countdownStart
repeat with x from 1 to 5
display alert "Shutting down in " & (6 - x) & " minutes" giving up after 5
delay 55
end repeat
repeat with x from 1 to 60 by 10
display alert "Shutting down in " & (70 - x) & " seconds" giving up after 5
delay 5
end repeat


-- command to shut down goes here

For shutting down you have a few options, including a shell that will shut it down hard without giving the user a chance to cancel

HTH,

ES

On Sep 24, 2009, at 11:39pm, Jarrod Coffin wrote:

Hey I want to make a timer to shut off my computer. I would like it to prompt for an amount of time before it starts to countdown then display the amount of time it has left before shut down. I have no clue how to do this so a few hints would be helpful.

Thanks.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- 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
References: 
 >TImer (From: Jarrod Coffin <email@hidden>)

  • Prev by Date: Re: Manipulating text
  • Next by Date: Re: Photoshop CS3 and CS4 [was Re: AppleScript & inDesign CS4 & 10.6]
  • Previous by thread: TImer
  • Next by thread: Re: TImer
  • Index(es):
    • Date
    • Thread