applescript

An AppleScript/Bash combination to annoy theifs

So here's a combination shell script/launch daemon/AppleScript that, if computer is stolen, puts a sticky growl notification on the screen (every two seconds...repeatedly...filling the entire screen eventually) with your name and phone number, offering a cash reward if computer is stolen.

First here's the AppleScript, which I have saved under /etc/.stolen/StolenGrowlNotifier.scpt:

Read more...

sayit.sh

#!/bin/bash

## Written by Jacob Braun, http://five.jacobbraun.com

sayit=`grep true /etc/sayit`

## If $sayit is found to be true, then all hell breaks lose.

while [ $sayit == "true" ]; do
        COUNTER=0
        while [ $COUNTER -lt 10 ]; do
                osascript -e 'set volume 7'
                say -v Victoria "This computer has been stolen from Your Name. Please call **phone number** to return computer for cash reward, no questions asked."
                sleep 2
                let COUNTER=COUNTER+1
        done
        sayit=`grep true /etc/sayit`
done
exit 0

StolenGrowlNotifier.scpt

tell application "GrowlHelperApp"
        set the allNotificationsList to ¬
                {"Stolen"}
       
        set the enabledNotificationsList to ¬
                {"Stolen"}
       
        register as application ¬
                "Stolen Mac" all notifications allNotificationsList ¬
                default notifications enabledNotificationsList ¬
               
        notify with name ¬
                "Stolen" title ¬
                "This computer has been stolen." description ¬
                "Please call *phonenumber* for no questions asked cash reward." application name ¬
                "Stolen Mac" icon of file "file:///etc/.stolen/apple-lock-icon.icns" priority 2 with sticky
end tell
Syndicate content