title: How to send pictures using AppleScript
body: <p>I made a script that sends messages to people. I also want to be able to send pictures through this script. </p>
  
  <pre><code>on run
      tell application "Messages"
          set targetService to 1st service whose service type = iMessage
          set targetBuddy to buddy "18008888888" of targetService
  
          repeat 3 times
              send "/Users/ADMIN/Desktop/photo.png" to 
  targetBuddy
          end repeat
  
      end tell
  end run
  </code></pre>
  
  <p>Putting the directory of the photo in quotations makes the message sent be a string, and taking away the quotes results in an error.</p>