Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the ' 10.7: Messages.app (BETA) uses iChat syntax for AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.7: Messages.app (BETA) uses iChat syntax for AppleScript
Authored by: Gobo on Feb 21, '12 01:33:08AM
I've been trying to send notifications to Growl from Messages, and it works somewhat, but I can't get the Buddy name from the event. Any help would be greatly appreciated. Here's what I have, this sends the content of the message to Growl as a notification:


using terms from application "iChat"
	
	on message received theMessage from theBuddy for theChat
		tell application "Growl"
			register as application 
				"Messages" all notifications {"Message"} 
				default notifications {"Message"} 
				icon of application "iChat"
			notify with name 
				"Message" title 
				"Message" description 
				theMessage application name "Messages"
			
		end tell
		
	end message received
	
end using terms from

Edited on Feb 21, '12 01:33:25AM by Gobo


[ Reply to This | # ]
10.7: Messages.app (BETA) uses iChat syntax for AppleScript
Authored by: mark hunte on Feb 22, '12 04:16:01PM
I did leave a clue in my original code. (name of theBuddy )
using terms from application "iChat"
	
	on message received theMessage from theBuddy for theChat
		tell application "Growl"
			register as application 
				"Messages" all notifications {"Message"} 
				default notifications {"Message"} 
				icon of application "iChat"
			notify with name 
				"Message" title 
				(name of theBuddy & " - Message") description 
				theMessage application name "Messages"
			
		end tell
		
	end message received
---
mh
---
mh
Edited on Feb 22, '12 04:16:43PM by mark hunte


[ Reply to This | # ]