Dim answer(5) As String'这段代码属于通用区域
Private Sub Command1_Click()
answer(5) = "有事吗"
answer(1) = "你好"
answer(2) = "谢谢"
answer(3) = "怎么了"
answer(4) = "你也好啊"
If InStr(1, Text1, "你好") <> 0 Then
Text2 = answer(Int(4 * Rnd) + 1)
End If
answer(5) = "有事吗"
answer(1) = "干嘛"
answer(2) = "6"
answer(3) = "额"
answer(4) = "怎么了"
If InStr(1, Text1, "嘿") <> 0 Then
Text2 = answer(Int(4 * Rnd) + 1)
End If
IF Instr(lcase(Text1.Text),"版本")>0 then Text2.Text = "AI补丁版本2.0"
answer(5) = "我也是"
answer(1) = "挺好的"
answer(2) = "6"
answer(3) = "额"
answer(4) = "嗯"
If InStr(1, Text1, "食物") <> 0 Then
Text2 = answer(Int(4 * Rnd) + 1)
End If
answer(5) = "哭哭"
answer(1) = "为什么啊"
answer(2) = "好吧"
answer(3) = "怎么了"
answer(4) = "你也再见"
If InStr(1, Text1, "再见") <> 0 Then
Text2 = answer(Int(4 * Rnd) + 1)
End If
If InStr(LCase(Text1.Text), "几点") > 0 Then text2.text="现在是北京时间:" & time
If InStr(LCase(Text1.Text), "厉害啊") > 0 Then Text2.Text = "谢谢夸奖"
If InStr(LCase(Text1.Text), "谢谢") > 0 Then Text2.Text = "不用谢"
IF Instr(lcase(Text1.Text),"傻")>0 then Text2.Text =Text1.Text & "你才傻!"
IF Instr(lcase(Text1.Text),"呆")>0 then Text2.Text =Text1.Text & "你也呆!"
IF Instr(lcase(Text1.Text),"岁")>0 then Text2.Text =Text1.Text & "我有零岁。"<