Created
October 29, 2010 17:12
-
-
Save philchristensen/653920 to your computer and use it in GitHub Desktop.
a script to set your iChat message to the output from fortune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my $fortune = `/sw/bin/fortune -s`; | |
$fortune =~ s/"/\\"/g; | |
open(OSASCRIPT, "| /usr/bin/osascript"); | |
print OSASCRIPT <<EOF; | |
tell application "iChat" | |
set status message to "$fortune" | |
end tell | |
EOF | |
close(OSASCRIPT); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment