PDA

View Full Version : Use iTunes as a wake up alarm?


Screengem0531
10-28-2005, 12:11 AM
I don't know if this is possible but can i use itunes as an alarm? I would like to have itunes start playing music from my library at a certain time I chose depending when i want/need to get up.

Jay Carr
10-28-2005, 02:08 AM
Actually yeah. I used to do it as a two step process. I'm assuming there's an easier way, but here's what I did:

Go into System Prefs then Energy Saver. Go to schedule and set it up to wake up whenever you want to get up.

Then, go to Accounts. Open up the Login Items and put a song in for one of your startup items. That way it will play when your computer wakes up in the morning.

Granted, there's got to be an easier way out there. And this procedure might get annoying because the song would play every time you turn your computer on. But until you find a real program to do it...this might help.

hayne
10-28-2005, 04:20 AM
There are several 3rd-party utilities that do this kind of thing - search at www.macupdate.com

mark hunte
10-28-2005, 05:55 AM
Go to iTunes make a new Smart Playlist called alarmPlaylist
Add to it what you want.
Copy the script below and save as a script file using Script Editor.

tell application "iTunes"
set this_playlist to playlist "alarmPlaylist"
play this_playlist
end tell

Go to iCal set a new event at the time you want. Select the alarm to run script. Select the script you just made.

You do not have to have iTunes running or the playlist selected. it will open and go to the playlist at the time you set.

Las_Vegas
10-28-2005, 12:00 PM
I don't know how many times I've seen movies portraying a Mac acting as an alarm clock with all sorts of cool animation and sound in some nerd childs bedroom. Every single time, I wonder where that program came from and where I can get it. Perhaps it's a part of the "Hollywood OS" Apple wrote for display on film; Larger, smoother fonts and flicker free video with psudo official looking aps to look like its actually being used.

ThreeDee
10-28-2005, 08:14 PM
I've been trying to make an app with a free program called SilverCreator, and all it does it launches 2 applescripts after a timer is over. The UI and splash screen is terrible, but you can try it out if you want. Right now you set it in sec, min, and hours and it counds down. I'm trying to make it get the time, then turn on iTunes when the time comes. It's at my site at http://bigpixel.macintoshdevelopers.net and it's still being developed.

And yes, I am a novice programmer, but I make sure my apps actually work with almost no bugs before releasing them.

cwtnospam
10-28-2005, 09:19 PM
You do not have to have iTunes running or the playlist selected.
Or you could use this simple script

tell application "iTunes"
play
end tell

and pick a different playlist the night before. When iCal runs the script, iTunes will start at the beginning of the last playlist selected, using whatever settings you were using last. So for example, if the list was set to shuffle, then it will do that. :)

gldfshkpr
10-29-2005, 01:15 AM
i use ical. new event > alarm > open file > my song.m4a

It's the same song everymorning. I imagine it could point to a playlist as well. I like the song ...

mark hunte
10-29-2005, 03:30 AM
Or you could use this simple script

tell application "iTunes"
play
end tell

and pick a different playlist the night before. When iCal runs the script, iTunes will start at the beginning of the last playlist selected, using whatever settings you were using last. So for example, if the list was set to shuffle, then it will do that. :)

Thats the point of the smart playlist. you can choose what ever (one song, one album or ten, or all of one artist.
) , when ever to put in it.

It also means you can still listen to iTunes through the day without having to remember to set the playlist to the one you want when you have finished listening to your tunes...

cwtnospam
10-29-2005, 08:01 AM
Yes, but the point of just using the play command is that you can easily change from one playlist to another by selecting a new playlist in iTunes. To do that using an alarmPlaylist you would need to either change the script everyday, or make alarmPlaylist contain other playlist(s). Even then, you'd need to edit alarmPlaylist each day.

mark hunte
10-30-2005, 10:14 AM
You can do that with the alarmPlaylist. (smart playlist)
Just set the selection to 'playlist' you then get a drop-down of all your playlists. This is just as easy plus you have all the other benefits.
But each to there own.

Screengem0531
10-30-2005, 06:02 PM
Hey, thanks for all of the replies and i. I got a bunch of info from you guys and i now know how to make itunes my alarm.
Only problem is, i turn my computer off at night so i make it automatically turn on before the alarm but i have a login screen. so the only way i can have my alarm is either get rid of my login screen or leave my computer on all night. Unless there is another way around this...

jimdrake
10-30-2005, 08:06 PM
the only way i can have my alarm is either get rid of my login screen or leave my computer on all night
Instead of shut-down you can just send your computer to sleep. However, you have to disable the password prompt on wake.

James.

cwtnospam
10-30-2005, 08:37 PM
If you're intending to use the computer to wake you, it shouldn't be a problem to set the computer start up about 5 minutes before the alarm and to auto-login. After all, if it isn't safe in your bedroom, where is it safe?

Screengem0531
10-31-2005, 06:06 PM
I just dont want to switch between auto login and where it prompts you for a password.

cwtnospam
10-31-2005, 07:47 PM
You could put your iTunes library in /users/shared and create a new user account that only does iCal & iTunes and set that to auto login. Then you would still need to log into your normal account.

Screengem0531
10-31-2005, 10:09 PM
I just might do that. thx

Screengem0531
10-31-2005, 10:24 PM
Another question....if my laptop is closed, will it still boot up if i have it scheduled or do i have to leave the screen open?

Las_Vegas
11-01-2005, 12:27 AM
If it's scheduled to boot at a given time, it will do so open or closed.

Screengem0531
11-01-2005, 09:15 AM
Ok, thanks

coachfitz
11-19-2009, 09:03 AM
Hi,

Guys, I've been following your post and the information is fantastic! However, I am trying to run an Alarm on a lap top to turn on iTunes to run AirTunes through an Airport Express and out to my Backyard speakers.

However, every morning that I wake up it shows on my laptop that the Script didn't execute because of an error type 1005. When I looked up this type of error, it seems to be a network error?

Any ideas?

07hoffmannd
02-15-2011, 07:24 PM
the code...

tell application "iTunes"
set this_playlist to playlist "alarmPlaylist"
play this_playlist
end tell

just starts the playlist back where it was played from last. even if its on shuffle. how would you make it play a different song in that playlist everytime?

NaOH
02-19-2011, 02:01 PM
This script just worked for me and does not begin playing with the same song.

tell application "iTunes"
set view of front browser window to playlist "InsertPlaylistNameHere"
if player state is stopped then play
end tell

07hoffmannd
02-24-2011, 05:30 PM
when you use the code

tell application "iTunes"
set this_playlist to playlist "alarmPlaylist"
play this_playlist
end tell

it just starts the playlist from where it played last. any way to get it to play a different song in that playlist everytime it goes off