use Perl Log In
Eliza, AppleScript, AIM, and Perl
I saw this and I was curious as to how to best do it with MacPerl and Apple events (which are something I spend significant time on), so I went ahead and wrote my own version that is all MacPerl (except for a three-line handler written in AppleScript to redirect the event to MacPerl), using Mac::AppleEvents::Simple, Mac::Glue, and, of course, Chatbot::Eliza. The source is available, for kicks. The author said he'd put his up soon.