Script SMS
Hello,
I run this script without problem. But if I add a second number I have an error. What is the solution please.
Thank you.
tell application "SecuritySpy"
capture image camera number 19 as "/tmp/ss-temp-image.jpg" with overwrite
end tell
tell application "Messages"
set targetService to id of 1st service whose service type = iMessage
set theBuddy to buddy "0007013861" of service id targetService
set theBuddy to buddy "0002912164" of service id targetService
send file POSIX file "/tmp/ss-temp-image.jpg" to theBuddy
end tell
I run this script without problem. But if I add a second number I have an error. What is the solution please.
Thank you.
tell application "SecuritySpy"
capture image camera number 19 as "/tmp/ss-temp-image.jpg" with overwrite
end tell
tell application "Messages"
set targetService to id of 1st service whose service type = iMessage
set theBuddy to buddy "0007013861" of service id targetService
set theBuddy to buddy "0002912164" of service id targetService
send file POSIX file "/tmp/ss-temp-image.jpg" to theBuddy
end tell
Comments
set targetService to id of 1st service whose service type = iMessage
set theBuddy to buddy "0007013861" of service id targetService
send file POSIX file "/tmp/ss-temp-image.jpg" to theBuddy
set theBuddy to buddy "0002912164" of service id targetService
send file POSIX file "/tmp/ss-temp-image.jpg" to theBuddy
you are great. it works perfectly. thank you