Created
December 20, 2013 05:44
-
-
Save netstu/8050872 to your computer and use it in GitHub Desktop.
applescript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set csvData to read "/Users/netstu/Downloads/mbis.csv" | |
set csvEntries to paragraphs of csvData | |
repeat with i from 1 to count csvEntries | |
set phone to (csvEntries's item i)'s text | |
tell application "System Events" to tell process "Messages" | |
set input to "how are you" as text | |
click button 1 of group 1 of splitter group 1 of window 1 | |
delay 1 | |
keystroke "" & phone & "" -- type the reciever | |
keystroke return -- validate the previous input | |
--keystroke tab -- move to message input | |
--keystroke input -- type the message | |
--keystroke return | |
--keystroke return | |
end tell | |
tell application "Messages" | |
--tell application "System Events" to tell process "Messages" | |
--set phone to (csvEntries's item i)'s text | |
set myid to get id of first service | |
set theBuddy to buddy phone of service id myid | |
--set theBuddy to buddy phone of service "AIM" --id myid | |
send "祝您在圣诞节来临之际,合家欢乐,万事如意" to theBuddy | |
end tell | |
end repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment