10.8: Automatically open the Messages chat window

Apr 09, '13 09:12:00AM

Contributed by: Jokke72

I was annoyed by a behavior of Messages.app. When a friend sends me a message the chat window will not open automatically. Instead the Messages app icon will get a badge and bounce a couple of times in the dock.

But if I'm not currently at the computer, and since I do not use the Dock to launch apps and I have the Dock always hidden, I could easily miss a message for a long time. So I came up with the following solution.

First open /Utilities/AppleScript.app and paste the following into the script editor:

using terms from application "Messages"
	on message received theText from theBuddy for theChat
		set visible of window "Messages" to true
	end message received	
end using terms from
Pick a name and save the script in the scripts folder ~/Library/Scripts.

Next open up /Applications/Messages.app and do the following: Now when you receive a new message while you are away from the computer you have an open window with the message waiting for you.

[crarko adds: I haven't tested this one. You need to be running 10.8 or later to have the Messages application, of course.]

Comments (8)

Mac OS X Hints