Adium Automatic Reconnect: Difference between revisions

From Wurst-Wasser.net
Jump to navigation Jump to search
No edit summary
No edit summary
(One intermediate revision by the same user not shown)
Line 30: Line 30:


'''Thats it.'''
'''Thats it.'''
----
[[Category:Development]]
[[Category:AppleScript]]

Revision as of 21:11, 18 October 2010

My DSL ISP disconnects me every 24 hours. So I set up a timer to automatically disconnect me, when I'm not online (around 5:15am). Each time Adium gets disconnected and won't reconnect automatically. This is, what my script does, it simply disconnects (just to be sure) and reconnects.

For Adium X 1.2 and later:

tell application "Adium"
repeat with a in (every account)
if enabled of a is true and status type of a is offline then
go online a
end if
end repeat
end tell

For Adium X previous to version 1.2:

tell application "Adium"
repeat with a in (accounts)
disconnect a
connect a
end repeat
end tell

Save this script als Application, and add something like this to your crontab:

40 05 * * * open /Users/heiko/bin/Adium\ Reconnect.app >> /dev/null #2>&1


Thats it.