Sunday, November 18, 2007

iTunes Sleep Timer

If you're like me, you enjoy listening to music when you go to sleep from time to time. The only problem is iTunes doesn't have a sleep timer function, which is weird given that its predominantly a stereo for most college students. Anyways, here's how you can add sleep timer functionality right into iTunes without downloading any extra applications:

For this you'll need an application called Script editor, you will have it in your applications folder inside a folder called Applescript, unless you were trying to save space one day and threw it out, any script editor will do for this very small task though if you did trash it.

itunes

1. Create a folder called “Scripts” in the “Users/you/Library/iTunes/” directory.
2. Open the Script Editor located in “Applications/AppleScript/” folder.
3. Type the following code:


Tell application “iTunes”
Delay 3600
Quit
End tell


*note that you can change the delay time to any other time in seconds.
**also note that you can change the "Quit" to "Pause" if you like.
4. In the File> Save As… menu save the script as a application, deselecting the Startup Screen and Stay Open options. Save it to your newly created “Scripts” folder with whatever name you want.
5. Open up iTunes. You’ll see a new menu that will give you access to all your iTunes AppleScripts.
The only issue with this little trick is that once you tell iTunes to start a script it won't let you do anything within the program until the script is done. So if you change your mind, you'll have to force quit iTunes.

No comments:

Post a Comment