Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Script ideas' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Script ideas
Authored by: callefjant on Apr 19, '06 12:40:30PM

A few ideas, for those who may find it interesting:

I have a repeating event in iTunes that invokes an AppleScript every weekday morning. I usually have it set to 8:00 am but I can change the time individually for any day I want. The script first checks with Salling Clicker or BluePhone Elite that I'm actually at home (if my phone is at home, I probably am as well). Sometimes I more or less accidently sleep elsewhere or I just went out before the alarm is triggered, and I don't wan't to have my neighbours to listen to some crapy bad music all day if I'm not at home.

If one uses Clicker and if Clicker supports proximity for the device, it's an easy task. The device I use since a few weeks ago, a Nokia 6280, is not fully supported by Clicker, but instead by BluePhone Elite. I've told BluePhone Elite to print 'false' to a file when I go out of range and print 'true' when I return.

If I'm home, the script checks the system volume and the iTunes ditto so that it's all loud enough to wake me up. Finally it fades in the currently paused track (or the first track in the playlist, if I've forgotten to set some nice wake up-music before going to bed).

It could probably be even more slicker, but this works for me.

-- If one uses Blue Phone Elite (remove if not used)
set theFile to alias ((path to library folder from user domain as text) & "iApps:is_home") as text
set the target_file to the theFile as text
set the open_target_file to open for access file target_file
set fileContent to (read open_target_file)
close access the open_target_file
set is_home to (fileContent is "true")

-- If one uses Salling Clicker (remove if not used)
tell application "SEC Helper"
set is_home to (proximity state of terminal 1 is within proximity)
end tell

if is_home then
get volume settings
set sysVol to output volume of the result
if ((sysVol / 100) * 7) < 1 then set volume 1
tell application "iTunes"
set myVol to sound volume
if myVol < 20 then set myVol to 20
set sound volume to 0
repeat with i from 0 to myVol
set sound volume to i
delay 0.1
end repeat
end tell
end if

[ Reply to This | # ]
Script ideas
Authored by: xSmurf on Apr 19, '06 04:49:00PM

Wow this is a great idea. Dunno why I didn't think of this before. Now I only need to fix my sound output problem. I've made an apple script to switch to the iMic for audio output (The iMic is routed to my bedroom). Works fine... except when I'm not in front of the computer, in which case the script totally messes up and refuses to change audio output. So although I have a completely automated alarm system (I only need to enter my school schedule once every semester) I still need to switch audio outputs every night or I'm doomed!

PM G4 DP 800 / 1.25gb / 120Gb+80Gb / CD/DVD±RW/RAM/DL
- The only APP Smurf

[ Reply to This | # ]
Script ideas
Authored by: Batshua on May 24, '06 03:31:55PM

If you'll forgive me, I'm not up on my AppleScripting at all. What do your proximity scripts say?

[ Reply to This | # ]