| EverythingDigital | RSS Feed | Flickr Photos | What Is Podcasting? |


« Catching Up | Main | Improved P.O.V. Bike »

April 17, 2005

iTunes Sleep Timer

Here is a simple sleep timer app I made for iTunes. Basically, it asks you for an amount of time (in minutes), and whether or not you want the computer to sleep as well. It will then wait the amount of time you requested, and then pause iTunes and put your computer to sleep if you chose that option.

DOWNLOAD: iTunes Sleep Timer | iTunes Sleep Timer Source


--iTunes Sleep Timer 1.0
--April 17, 2005

--Created by Alan Joyce
--http://everythingdigital.org

repeat
copy text returned of (display dialog "In how many minutes would you like iTunes to stop playing? Please enter a numerical value." default answer "30") to minNum
if minNum is less than 0 then
display dialog "Please enter a number greater than zero."
else if minNum is "0" then
display dialog "Please enter a number greater than zero."
else
exit repeat
end if
end repeat

copy button returned of (display dialog "Would you like your computer to go to sleep after iTunes stops playing?" buttons {"No", "Yes"} default button "Yes") to doSleep

set secNum to 60

copy secNum * minNum to delayTime

delay delayTime

tell application "iTunes"
pause
end tell

if doSleep is "Yes" then
tell application "System Events"
sleep
end tell
end if

Posted by Alan Joyce at April 17, 2005 02:33 PM

Trackback Pings

TrackBack URL for this entry:
http://www.everythingdigital.org/cgi-bin/mt-tb.cgi/164

Comments

Post a comment




Remember Me?



(You must preview before you post. This is to prevent spam.)