|
#1
| ||||
| ||||
| [HOWTO] - Make iCal an alarm clock! 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!
__________________ [ www.inversiondesigns.com ] . ] dual 867 G4 . 768 MB DDR [ . [ shut your noise tube, taco human ] |
|
#2
| ||||
| ||||
| Hmm... Well: I don't want to clutter my calendar(s) with daily alarmclock stuff, but I'm sure there are many people who appreciate this howto! ... Also: There are probably more uses for this, too - and this howto is a great start.
__________________ MacBook Air 13" 1.6 GHz, 2 GB RAM, 80 GB HD. Mac OS X 10.5.5 MacBook 13" 1.83 GHz, 2 GB RAM, 160 GB HD. Mac OS X 10.5.5 Hackintosh Core2Duo 2.4 GHz, 2 GB RAM, 160 GB HD. Mac OS X 10.5.5 iPhone 3G 16 GB (v2.1), AppleTV 1G 40 GB (v2.1) Mac user since 1987, Apple Product Professional 2007, 2008. |
|
#3
| ||||
| ||||
| just make a calendar called "wake up idiot" or whatever, then hide it =) that's what i did anyway.
__________________ [ www.inversiondesigns.com ] . ] dual 867 G4 . 768 MB DDR [ . [ shut your noise tube, taco human ] |
|
#4
| |||
| |||
| I have wanted to know how to do this for a long time. Is there some way to do it without iCal, where Applescript does the tell at a certain time? i have always wondered. |
|
#5
| |||
| |||
| this can probably be done with cron. it has access to applescript, no? "open filename"
__________________ teletran: G4/400 Sawtooth upgraded to 1GHz sonnet; 40GB IDE + 120 GB IDE internal, 10GB SCSI; 1.25GB RAM; Radeon 8500 (128MB DDR); ATi Rage Pro 128 (32MB); OS X 10.4 Tiger; OS 9.2.2 crichton: PowerBook G3 500MHz; 8GB HD; 768MB RAM; OS X Jag 10.4 Tiger; OS 9.2.2 periphery: Intuous Grapphire Tablet; 10GB iPod (2nd Gen); Sony Ericsson T616 Phone; Palm m505; LaCie CD-RW; Epson Stylus Photo 820, some other odds and ends |
|
#6
| ||||
| ||||
| well, stupid question i guess, but is it possible for the computer to go to sleep between the sessions(read; fadeout and wake-up)?? or does it has to been only screensaver-mode or whatever.. and how exactly do i "tell to to iCal" to open the script? just paste it into my calender at prefered time, or is it more to it? alex. |
|
#7
| ||||
| ||||
| If you're really lazy or stumped, theres several pre-written scripts and applet plugin things on versiontracker for this, all with slogans like "make iTunes and alarm clock!" and similar things. You could probably just download and config one of those.... |
![]() |
| Thread Tools | |
|
|