title: How to send an imessage text with applescript, only in provided service?
body: <p>Can somebody show me how to send a message directly to the user of iMessage via Messages app?</p>
  
  <pre><code>tell application "Messages"
      if service type of service of buddy whose name is ("Name here" is "iMessage") then set x to 1
      if service type of service of buddy whose name is ("Name here" is "iMessage") then set x to 2
      if service type of service of buddy whose name is ("Name here" is "iMessage") then set x to 3
  
      send "Message" to buddy "mail of name" of service x
  end tell
  </code></pre>
  
  <p>I need to send a message to an account only via iMessage, not via google talk, AIM, bonjour.
  Thank you!</p>