'This script detects and talks about games.
'Hal will save and use any game talk.
'Games.brn is the detection file so edit freely
'GamesTalk.brn is the read/write .brn file.
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "GAMES.brn") = "TRUE" Then
AnswerSent = "" & Trim(OriginalSentence)
HalBrain.AppendFile WorkingDir & "GAMESTALK" & ".brn", AnswerSent
End If
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "GAMES.brn") = "TRUE" Then
GamePlay = HalBrain.ChooseSentenceFromFile(WorkingDir & "GAMESTALK.brn")
GetResponse = GamePlay & vbCrLf
DebugInfo = DebugInfo & "The user is talking about games: " & GamePlay & vbCrLf
Else
DebugInfo = DebugInfo & "User is not talking about games: " & GamePlay & vbCrLf
End If
Best of wishes and new discoveries.
Jerry.
Download Attachment: Games.brn1.25 KB
Download Attachment: GAMESTALK.brn538 Bytes