image
image

Go Back   macosx.com > Mac Help Forums > HOWTO & FAQs

Reply
 
Thread Tools
  #1  
Old October 20th, 2003, 11:12 PM
boi's Avatar
boi boi is offline
official breaker of macs.
 
Join Date: Sep 2001
Posts: 942
Thanks: 0
Thanked 0 Times in 0 Posts
boi is on a distinguished road
[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 ]
Reply With Quote
  #2  
Old October 28th, 2003, 03:34 AM
fryke's Avatar
Super Moderator
 
Join Date: Sep 2000
Location: macosx.com
Posts: 13,158
Thanks: 2
Thanked 12 Times in 12 Posts
fryke has a spectacular aura aboutfryke has a spectacular aura about
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.
Reply With Quote
  #3  
Old October 29th, 2003, 11:11 PM
boi's Avatar
boi boi is offline
official breaker of macs.
 
Join Date: Sep 2001
Posts: 942
Thanks: 0
Thanked 0 Times in 0 Posts
boi is on a distinguished road
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 ]
Reply With Quote
  #4  
Old October 31st, 2003, 04:49 PM
Registered User
 
Join Date: Apr 2003
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
alphap1us is on a distinguished road
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.
Reply With Quote
  #5  
Old May 8th, 2004, 10:23 AM
and burn
 
Join Date: May 2002
Location: philadelphia
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
crash is on a distinguished road
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
Reply With Quote
  #6  
Old May 8th, 2004, 12:06 PM
alexandr's Avatar
kosmonaut
 
Join Date: Mar 2003
Location: altea - spain
Posts: 313
Thanks: 0
Thanked 0 Times in 0 Posts
alexandr is on a distinguished road
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.
Reply With Quote
  #7  
Old May 10th, 2004, 07:26 AM
MacMuppet's Avatar
Registered User
 
Join Date: Jan 2004
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts
MacMuppet is on a distinguished road
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....
Reply With Quote
  #8  
Old September 2nd, 2004, 01:52 PM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
jareha is on a distinguished road
You all should check out iTaf. It has rid of the frustration (largely do to user error) involved in manually setting an alarm clock every nite.

<< Jonathan
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 05:23 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.