El Capitan的Applescript并没有触发第一次收到的消息

时间:2015-12-09 01:46:45

标签: applescript imessage

以下AppleScript将仅触发收到的第二封及后续消息,但不会触发第一封未通知的消息。我抓住了SpeakEvents.applescript并拨打了一些用于故障排除的内容。现在我只想回复所收到的一切。

using terms from application "Messages"
on message received theMessage from theBuddy with messageBody
    send messageBody to theBuddy
    say messageBody
end message received

on chat room message received with messageBody
    say messageBody
end chat room message received

on active chat message received with messageBody
    say messageBody
end active chat message received

on addressed message received theMessage from theBuddy for theChat with messageBody
    say messageBody
end addressed message received

on received text invitation with messageBody
    say messageBody
end received text invitation

on received audio invitation theText from theBuddy for theChat with messageBody
    say messageBody
end received audio invitation

on received video invitation theText from theBuddy for theChat with messageBody
    say messageBody
end received video invitation

on buddy authorization requested with messageBody
    say messageBody
end buddy authorization requested

on addressed chat room message received with messageBody
    say messageBody
end addressed chat room message received

# The following are unused but need to be defined to avoid an error

on login finished with messageBody
    say messageBody
end login finished

on logout finished with messageBody
    say messageBody
end logout finished

on buddy became available with messageBody
    say messageBody
end buddy became available

on buddy became unavailable with messageBody
    say messageBody
end buddy became unavailable

on received file transfer invitation theFileTransfer with messageBody
    say messageBody
end received file transfer invitation

on av chat started with messageBody
    say messageBody
end av chat started

on av chat ended with messageBody
    say messageBody
end av chat ended

on completed file transfer with messageBody
    say messageBody
end completed file transfer

end using terms from

0 个答案:

没有答案