我正在尝试为Adium写一个简单的聊天机器人,它会发布“哈哈”和“哈哈”,并回答一些人在不断添加我的烦人群聊中的基本问题。在Applescript中接收Adium消息
我已经用一些简单的发送和延迟命令覆盖了“lol”部分,但我还需要做一些交互。
对任何带问号的问题回答“是”,例如...
相信我或不信,这样一个简单的机器人会通过一个图灵测试来进行这些对话。
打开Adium词典并没有显示任何明显的获取消息的方式,也没有咆哮词典。
我确实发现每次收到邮件时我都可以运行脚本,有没有办法访问发送的邮件?
Adium pref http://media.ruk.ca/images/adiumpreferences.png
我的代码:
tell application "Adium"
activate
set theChat to the active chat
send theChat message "Hi"
delay 5
send theChat message "How's life?"
delay 10
repeat 10 times
send theChat message "Realy?"
delay 5
send theChat message "Lol :P"
delay 15
send theChat message "Haha XD"
delay 15
send theChat message "Yes1!!1"
delay 20
send theChat message "I like it! :D"
delay 10
end repeat
send theChat message "Bye!"
tell theChat to close
end tell
与Alan Turing一样,它是“图灵测试”。我不得不想知道有多少人会通过图灵测试。另外,在最后一个问题中,你的意思是你想要访问* received *消息,还是你刚刚发送的消息? – 2010-01-24 18:01:56
我会改变它。 是的,我想访问收到的消息,所以我可以在Applescript中编写一个基本的聊天机器人。 – Pepijn 2010-01-24 19:39:15
我一直在想这个我自己几年,从来没有发现任何使用。我有一种感觉,它符合Adium开发者的利益,以防止这种确切类型的事情发生 - 尽管其他人可以使用它。 – 2010-06-04 17:18:56