Tuesday, June 9, 2009

Not drinking fast enough, I can help....Or, Wake up and drink.

So I have this problem....It's not drinking....quickly. Sometimes I get to involved in my work, and don't drink quickly enough. Many men have this problem. And I am here to solve it. So how would one reminde one's self to drink.....A script of course. So here is a script that does an apple beep every 5 minutes(sleep, 300 seconds):

use Mac::AppleScript qw(RunAppleScript);
$booT = 1;
while ($booT) {
RunAppleScript(qq(beep\ndo shell script "/bin/sleep 1"))
or die "Didn't work!";

There is a problem with not recognizing the sound because if you are like me, you really tone out error sounds...cause you hate them. So the solution is to change your "beep" sound, to do that go to:
System Prefrences > Sound > Sound Effects
And change it to something you find annoying.....Hey windows does it...why not, you know.

You will need to install the perl module: Mac::AppleScript:
sudo cpan
install Mac::AppleScript

PS you guys see that...
Like booty

Also this is not my picture it is a CC licensed photo from here:

1 comment:

matthew said...

/me shakes head and laughs.