I'm not always within earshot of the audible Buddy Alerts that AIM produces, but I always have my pager on my belt, so I wrote a few scripts to email a quick notice to my pager when a buddy signs on. Although I much prefer Fire as my chat client, it does not yet allow a buddy alert to call an AppleScript, so you'll have to use AOL's AIM client to achieve this. This method uses the UNIX
mail command to send a message via
sendmail (which must already be configured properly). Also, you must be using a Dynamic DNS service.
- Execute the hostname command to ensure that your machine's hostname can be resolved by reverse-DNS lookup. Some mail servers will reject the mail if they cannot do a reverse lookup. If necessary, modify /etc/hostconfig as follows:
HOSTNAME=myhostname.dyndns.org
- Create a text file that contains the message that you wish to email to your pager. Use your favorite text editor (ie pico message.txt).
- Create a shell script that contains the following, including the full path
to the message.txt file:
#!/bin/sh
mail mytextpager@domain.com < /Users/username/Documents/message.txt
Where mytextpager@domain.com is the email address of your digital pager. Save the script with the .sh extension; for example, save as aimmail.sh. Make the script executable by typing sudo chmod a+x aimmail.sh
- Open Script Editor and create an AppleScript with the following, including the quotes:
tell application "Terminal"
do shell script "/bin/sh /Users/username/Documents/aimmail.sh"
end tell
Save the AppleScript as an application and check the box "Never Show Startup Screen."
- In AIM, edit the Buddy Alerts for your buddy to call the AppleScript that you created.
Now when this buddy signs on, you will get a text page on your digital pager.