代码(这是网上找到的)

tell application "Messages"

set csvDatato read "/Users/javalong/Desktop/message_push/test2.txt"

set csvEntriesto paragraphsof csvData

repeat with ifrom 1 to countcsvEntries

set phone to (csvEntries'sitem i)'stext

set myid to get idof first service

set theBuddy to buddyphone of service idmyid

send "今天北京晴,气温1327度;周二晴,气温1126度,北风3-4级;周三晴,气温1124度,微风<3"to theBuddy

delay 1

set FailNum to (getcount chat)

if FailNum > 100 then

repeat withj from 1 to FailNum

setphone to (getname of chat (FailNum -j))

setDelMsg to "iMessage;-;" &phone

ifexists (text chatid DelMsg)then

deletetext chat idDelMsg

end if

end repeat

end if

end repeat

end tell


代码 应该是没错,但是运行 抱错 如下。




解决办法:



这里点开,

就点开什么都不用做


然后就能运行成功啦  哈哈哈~~~~

Logo

Agent 垂直技术社区,欢迎活跃、内容共建,欢迎商务合作。wx: diudiu5555

更多推荐