title: OS X Messages AppleScript handler: save images?
body: <p>I've been attempting to use AppleScript to save incoming messages on an Apple Messages account, like so:</p>
  
  <pre><code>on active chat message received theMessage from theBuddy
      set theFileID to open for access POSIX file "/Users/me/Desktop/test" with write permission
      write theMessage to theFileID
      close access theFileID
      return theMessage
  end active chat message received
  </code></pre>
  
  <p>which works great for text messages, but if the user sends an image the message appears to just be an empty string. Is there any way to fetch this image, or - as I fear - is it not accessible?</p>