我正在尝试为Adium编写一个简单的聊天机器人,它将发布"lol"和"haha"并回答一些人不断加入我的讨厌群聊的基本问题.
我已经用重复的一些简单的发送和延迟命令覆盖了"lol"部分,但我也需要做一些交互.
对带有问号的任何东西回答"是",例如......
信不信由你,这样一个简单的机器人会通过图灵测试来进行这些对话.
打开Adium词典并没有显示任何明显的获取消息的方式,Growl词典也没有.
我确实发现每次收到消息都可以运行脚本,有没有办法访问发送的消息?
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
Run Code Online (Sandbox Code Playgroud)