Adium Automatic Reconnect: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
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. | 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: | |||
<tt> | |||
: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 | |||
</tt> | |||
For Adium X previous to version 1.2: | |||
<tt> | <tt> | ||
Line 16: | Line 30: | ||
'''Thats it.''' | '''Thats it.''' | ||
---- | |||
[[Category:Development]] | |||
[[Category:AppleScript]] | |||
[[Category:Mac OS X]] |
Latest revision as of 10:35, 11 April 2024
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
- if enabled of a is true and status type of a is offline then
- end repeat
- repeat with a in (every account)
- end tell
For Adium X previous to version 1.2:
- tell application "Adium"
- repeat with a in (accounts)
- disconnect a
- connect a
- end repeat
- repeat with a in (accounts)
- 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.