Shoutbox Invocation Script for Mac Users (Now with Merser's Python Interpretation)
April 23, 2013
First off, sorry-I realize that very few people are Mac users and can make use of this. Also, it's kind of useless if you have a bot or other project on page one, but if you need you can really work around that I guess.
Let's say that you want to work at the soldering station for a while but you want to know when they start talking about you in the Shout Box, or that you want to concentrate on an IDE for a while but have Safari in the background. Alternatively, let's say you're waiting for another LMRian to show up in the Shout Box under the same circumstances. This AppleScript will run every 5 minutes and let you know by speaking to you that someone is talking about you or that they are there.
Obviously, this one is set up for me on LMR using Safari and the voice says "You have been invoked!" If you are an Mac user but you've never used AppleScript, it's easier than Arduino or AxePad. Just open the AppleScript Editor (which should either be in your Applications folder or its Utilities subfolder) and paste the code below into it, make your changes, then click on the Compile hammer to make sure there aren't any accidental artefacts, then hit "Run" and it will be off. You can save it as an Application on your desktop that you can launch at any time and leave running ad infinitum, as a script that you can edit later and run from the Script Editor, as text... you get the idea.
This could probably be adjusted to Python rather easily, but I like the fact that it talks to me. I don't know if Python accesses that.
set pagURL to "http://letsmakerobots.com/"
if application "Safari" is not running then
tell application "Safari"
set URL of document 1 of window 1 to "http://letsmakerobots.com/"
-- delay to let page load.
if source of document 1 of window 1 contains "Max" then
say "You have been invoked."
return 300 --five minutes
*Tested on OS X.5.8, PPC.