Hi, i am trying to send an image via messages using applescript and I get the error "Messages got an error: Can't send specified file." Everything else works fine, it is just send the image. This is what I have in my AppleScript:
I am an AppleScript noob and I have been able to piece this together from various posts on here and elsewhere.
Code:
do shell script "curl -f 'http://<IP_OF_CAMERA/snapshot.cgi?user=<USERNAME>&pwd=<PASSWORD>&resolution=32' -o ~/Desktop/test.png"
tell application "Messages"
send "Garage door has been opened." to buddy "<iMESSAGE_RECIPIENT.com>"
end tell
set theAttachment1 to POSIX file "Desktop/test.png"
tell application "Messages"
send theAttachment1 to buddy "<iMESSAGE_RECIPIENT.com>"
end tell
I am an AppleScript noob and I have been able to piece this together from various posts on here and elsewhere.