Re: TImer
Re: TImer
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>) |