我正在使用 Craig Smith 的以下代码:
set chatsToKill to {}
tell application "Messages"
set allChats to every chat
repeat with eachChat in allChats
set thePeeps to participants of eachChat
repeat with oneParticipant in thePeeps
if oneParticipant's handle contains "@" then
if chatsToKill does not contain eachChat's id then set end of chatsToKill to eachChat's id
end if
end repeat
end repeat
repeat with deathChat in chatsToKill
delete item 1 of (get every chat whose id = deathChat)
end repeat
end tell
我想知道是否有一种方法可以删除用户句柄中只有 4 位数字的发件人的对话?
这 4 位数字总是不同的,也不相同。我尝试了各种通配符,但我发现 Applescript 不支持它们。