跳转至

【苹果群发】【iMessage群发】技术开源

【苹果群发】【iMessage群发】技术开源

在MAC OS体系上Apple公司供给一种叫Apple script的剧本来自动实现使命。

实现iMessage群发的Apple script脚本代码以下:

tell application "Messages" set csvDatatoread "/Users/dengzhenhua/Desktop/send.txt"

set csvEntriestoparagraphsofcsvData

repeat with ifrom 1tocountcsvEntries

set phone to (csvEntries'sitemi)'stext

set myid to get idof firstservice

set theBuddy to buddyphoneof serviceidmyid

send "本日北京晴,气温13到27度;周二晴,气温11到26度,冬风3-4级;周三晴,气温11到24度,轻风<3 ---- 品络互联 www.pinluo.com"totheBuddy

delay 1

set FailNum to (getcountchat)

if FailNum > 100 then

repeat withjfrom 1 to FailNum

end tell

IM