Hi hak'ers.
I recently stumpled upon the OS X alarm clock entry at the Hak5 Wiki (http://wiki.hak5.org/wiki/RSS_Alarm_Clock_Under_OS_X), and decided I wanted to try it out (I am a sleepyhead)
I got it all working pretty quickly, however there one issue:
Since the guide were made, Aurora has changed a bit:
1. now there is only a 14-day trial :(
2. Aurora uses embedded iTunes instead of the real deal.
So the problem is:
The python script can't "hook" iTunes (since it's not being used for playback no more) and there is therefore no delay between (embedded) itunes start playing music, and recent slashdot articles are being read out loud by Vicki. Very annoying.
Here is the code:
#def pauseitunes():
"""If iTunes is running, pauses playing track"""
os.system("""osascript <<EOF
tell application \"System Events\" to if (application processes whose name is \"iTunes\") is not {} then tell application \"iTunes\" to pause
EOF""")
I tried replacing \"iTunes\" with Aurora, and iTunesHelper which both resulted in same error:
execution error: The variable pause is not defined. (-2753)
I'm new to system developing in OSX, so I didn't know osascript before reading this.
Is there any way to "descripe" an application so I can figure out how to pause the Aurora sound?
Thanks in advance.