'[UPDATED] 9-25-03 script has been changed.
'Here yah go guys.
'**** User want's to know his/her own name
'so hal is now going to tell them their real
'name if the user has mentioned their real name.
'there is are two attachments called
'NamesDetect.brn/MyNameIs.brn with this
'script so download them to your default folder.
'the [User] names.brn will automatically be created when the user tells
'hal their own name.
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "MyNameIs.brn") = "TRUE" Then
GetResponse = "Ok, say only your name and nothing else."
End If
If Instr (1, PrevSent, "Ok, say only your name and nothing else.", VbTextCompare) > 0 Then
AnswerSent = OriginalSentence
GetResponse = AnswerSent & ", Nice to meet you."
HalBrain.AppendFile WorkingDir & Trim(UserName) & "NAMES" & ".brn", Trim(OriginalSentence)
End If
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "NAMESDETECT.brn") = "TRUE" Then
RealName = HalBrain.ChooseSentenceFromFile(WorkingDir & Trim(UserName) & "NAMES.brn")
GetResponse = RealName & vbCrLf
DebugInfo = DebugInfo & "Hal is mentioning Users real name: " & RealName & vbCrLf
Else
DebugInfo = DebugInfo & "Hal has found nothing about Users real name: " & RealName & vbCrLf
End If
'Larry! thanks for helping me out with some of this.
'you're great
Download Attachment:
NAMESDETECT.BRN825 Bytes
Download Attachment:
MyNameIs.brn716 Bytes