I was looking for a way to have my machine notify me whenever it was booted (sort of a rudamtentry security system), and rather then buy some application to do this, I wrote a very small AppleScript to have Mail launch at boot and hide, send the message in the background, and then shut down mail. This is my first actual applescript and I'm sure there is a "better" way to do this, but it seemed to work for me. I tried to add comments to help any fellow "newbies" out there. Here's the script:
launch application "Mail"
tell application "Mail"
-- set parameters for subject, body and sender
set newMessage to make new outgoing message ¬
with properties ¬
{subject:"Your computer has Booted", content:"n/a", sender:"sender's email"}
tell newMessage
-- set Mail application to hide
set visible to false
-- set parameters for recipient
make new to recipient at end of to recipients with properties ¬
{address:"primary recipient's email address"}
-- set parameters for CC recipient
make new cc recipient at end of cc recipients with properties ¬
{address:"secondary recipient's email address"}
end tell
send newMessage
end tell
--quit Mail application
tell application "Mail" to quit
delay 10
quit
[robg adds: This older hint contains a shell script that can be setup via cron to do similar things, and it includes info like the output from traceroute. The problem with this AppleScript solution is that it will be triggered only when someone logs in to your account (assuming it's been placed in your login items list), not when the machine itself is booted -- and the odds are quite low that a thief will have your login password, too.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20041130093947460