我想使用AppleScript和Python发送iMessage。代码正在编译,但是没有消息正在发送。
script = """tell application "Messages"
send "TEST TEXT" to buddy "1xxxxxxx" of service "E:xxx@gmail.com"
end tell"""
def script_run(script):
applescript.run(script)
script_run(script)
script = """tell application "Messages"
send "TEST TEXT" to buddy "1xxxxxxx" of service "E:xxx@gmail.com"
end tell"""
def script_run(script):
applescript.run(script)
script_run(script)