This is a apple script as below. I want to read a file content and assign it as a variable for sending as iMessage content. But, I get an error.
tell application "Messages" set targetBuddy to "+xxxxxxxxxxx" set targetService to id of 1st service whose service type = iMessage set Shows to paragraphs of (read POSIX file "/Users/human/macairspace.txt") set textMessage to Shows set theBuddy to buddy targetBuddy of service id targetService send textMessage to theBuddy end tell
It shows an error message.
error "「Messages」Error：Can't make「file \"Macintosh HD:Users:human:macairspace.txt\"」as「file」。" number -1700 from file "Macintosh HD:Users:human:macairspace.txt" to file