I don't understand. In Yosemite you don't need any UI Scripting. Have they removed this from El Capitan as well? What happened to:
tell application "Messages"
set iMessageService to (first service whose service type is iMessage)
send "Hello World" to buddy "0123456789" of iMessageService
end tell
Cool, didn't realize that, thanks for checking. However this method doesn't appear to work for group chats as far as I can tell, only one-on-one messages