Python 如何在AppleScript上发送iMessage?
我想使用AppleScript和Python发送iMessage。正在编译代码,但未发送任何消息Python 如何在AppleScript上发送iMessage?,python,applescript,imessage,Python,Applescript,Imessage,我想使用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 = "
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)
我不知道这是否会成为您的一个因素,但如果您不知道,您将只能向消息中的现有对话发送消息。您不能将带有AppleScript的iMessage作为全新的对话发送。我不知道这是否会成为您的一个因素,但如果您不知道,您将只能向消息中的现有对话发送消息。您不能将带有AppleScript的iMessage作为全新对话发送。