Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I love the new Messages app in Mountain Lion, but there seems to be an issue while using it with a Yahoo account. My Yahoo account does not reconnect after the machine goes into standby or after a restart, I always have to manually connect that account, while other accounts work fine.

Does anyone know of a way of getting the Yahoo account to automatically reconnect? An AppleScript that tells Messages to connect the Yahoo account would be great too.

Edit: this seems to happen with my Gmail account as well.

share|improve this question
up vote 5 down vote accepted

I found a sort of solution to this bug. What I did is write an AppleScript which tells Messages to connect all accounts when one of the accounts successfully connects. I use Messages with Gmail, Yahoo and Bonjour, so when either of those connects, it "tells" all other accounts to connect. It's not failure-proof, but it seems to keep my accounts online properly so far.

using terms from application "Messages"
    on login finished for theService
        log in service "Yahoo!"
        log in service "Gmail"
        log in service "Bonjour"
    end login finished
end using terms from

Usage instructions:

  1. Edit the AppleScript above to include the services you are using
  2. Save it using "AppleScript" to a .scpt file
  3. Open Messages > Preferences > Alerts
  4. Set the script to run for the "When I Log In" event.


For the line containing log in service "<service>" you will need to replace <service> with the value you find in the Description field for that particular service in Messages’ account preferences. In my case my Yahoo! account had ”Yahoo” in its description field so I had to change log in service "Yahoo!" to log in service "Yahoo". Ditto for the other services.

share|improve this answer
In El Capitan, there is only a script handler now. How does one go about caching the 'When I Log In' event? – Michael K. Aug 12 '15 at 7:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.