Automatically reconnect iChat if connection drops

Aug 28, '08 07:30:03AM

Contributed by: ephramz

I've had the problem with my iChat Jabber connections (gtalk and yahoo.jabber.org.uk gateway) constantly crashing, causing an error dialog in iChat. Since the Chax add-on no longer seems to support automatically reconnecting to crashed connections in 10.5, I found this great idea for a crontab script to force a reconnection using AppleScript. However, the only problem is that this would start iChat even if it was not running.

So I used this slightly extended script to make it check if iChat was running before executing the login command. I added this line to my crontab (via crontab -e or the Cronnix crontab editor) to make it re-run every minute using the command line:

* * * * * osascript -e 'tell application "System Events" to if (processes whose name is "iChat") exists then tell application "iChat" to log in'
Hopefully they'll add this back into Chax, or even iChat itself, as it's a seemingly basic function.

[robg adds: I haven't tested this one.]

Comments (6)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20080826165311174