'[UPDATED] 9-23-03
'Here yah go guys.
'Hal now remembers your friends names.
'Download the files MyFriend.brn and FriendTalk.brn
'to your hals default folder, these two are detection files.
'The [User}friend.brn will be automatically created
'when you mention your friends name and follow hals instructions.
'Hal now knows the Users friend
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "MYFRIEND.brn") = "TRUE" Then
GetResponse = "Ok, say only your friends name and nothing else."
End If
If Instr (1, PrevSent, "Ok, say only your friends name and nothing else.", VbTextCompare) > 0 Then
AnswerSent = OriginalSentence
GetResponse = AnswerSent & ", That's a very nice name "
HalBrain.AppendFile WorkingDir & Trim(UserName) & "Friend" & ".brn", Trim(OriginalSentence)
End If
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "FriendTalk.brn") = "TRUE" Then
FriendsName = HalBrain.ChooseSentenceFromFile(WorkingDir & Trim(UserName) & "Friend.brn")
GetResponse = FriendsName
DebugInfo = DebugInfo & "The user is talking about friends name: " & FriendsName & vbCrLf
Else
DebugInfo = DebugInfo & "Hal has found nothing about friends name: " & FriendsName & vbCrLf
End If
'Best of wishes and grand new discoveries.
'Jerry.
Download Attachment:
MyFriend.brn542 Bytes
Download Attachment:
FriendTalk.brn758 Bytes