boi
official breaker of macs.
are you tired of all those mp3 alarm clock programs that don't fit your needs exactly?
well, it's time to harness the power and ease of use of applescript, the way apple intended. iCal's ability to open a program at certain times makes for a very powerful application, if used in conjunction with applescript.
let's say you're like me and listen to music at night to help you sleep at night. you've probably got a sleepy time playlist or something of the sort.
you'll need one script to hush itunes when you're sound asleep, and one script to start it again when you need to wake up.
------------------------------------
"hush itunes"
tell application "iTunes"
set myVol to sound volume
repeat until (myVol = 0)
set myVol to myVol - 0.25
set sound volume to myVol
end repeat
pause
end tell
this simple script just fades out whatever you're listening to (change the 0.25 to something even smaller if you want it to fade slower) and pauses itunes.
easy enough.
------------------------------------
"wake me up itunes"
tell application "iTunes"
set sound volume to 20
play playlist "wake up"
end tell
set volume 6
this script sets the itunes volume to 20 (out of 100) and sets the system volume to 6 (6 bars on the bezel). this is enough to wake me up-- i've got room mates and soundsticks, so i can't have it too loud.
save both of these scripts and open up ical. tell ical to open your first script at around 3AM or whenever you're sure you'll be sound asleep. next tell ical to open your other script when you want to wake up.
easy as that! a fully customizable alarm clock! hooray!
anyway, yeah. this was probably obvious to most people, but i'm surprised how many 'alarm clock' applications there are, when the best one is right under your nose!
well, it's time to harness the power and ease of use of applescript, the way apple intended. iCal's ability to open a program at certain times makes for a very powerful application, if used in conjunction with applescript.
let's say you're like me and listen to music at night to help you sleep at night. you've probably got a sleepy time playlist or something of the sort.
you'll need one script to hush itunes when you're sound asleep, and one script to start it again when you need to wake up.
------------------------------------
"hush itunes"
tell application "iTunes"
set myVol to sound volume
repeat until (myVol = 0)
set myVol to myVol - 0.25
set sound volume to myVol
end repeat
pause
end tell
this simple script just fades out whatever you're listening to (change the 0.25 to something even smaller if you want it to fade slower) and pauses itunes.
easy enough.
------------------------------------
"wake me up itunes"
tell application "iTunes"
set sound volume to 20
play playlist "wake up"
end tell
set volume 6
this script sets the itunes volume to 20 (out of 100) and sets the system volume to 6 (6 bars on the bezel). this is enough to wake me up-- i've got room mates and soundsticks, so i can't have it too loud.
save both of these scripts and open up ical. tell ical to open your first script at around 3AM or whenever you're sure you'll be sound asleep. next tell ical to open your other script when you want to wake up.
easy as that! a fully customizable alarm clock! hooray!
anyway, yeah. this was probably obvious to most people, but i'm surprised how many 'alarm clock' applications there are, when the best one is right under your nose!