This now can replace the current brain entry right after Compliments"
It is a modified version of an early brain entry. Working great now!
'RESPOND: CALL CAPITALS FUNCTIONS
'These 2 functions answer questions about US and World Capitals. The functions are built in to the DLL.
'We add a qualifying word to reduce false triggering of these two functions.
If InStr(UserSentence, "WHAT") > 0 Or InStr(UserSentence, "WHERE") > 0 Then
If Len(HalBrain.UsCaps(UserSentence)) > 4 Then
FindCapital = Trim(HalBrain.UsCaps(UserSentence))
End If
If Len(HalBrain.WorldCaps(UserSentence)) > 4 Then
FindCapital = Trim(HalBrain.WorldCaps(UserSentence))
End If
'=vonsmith= Added GetResponseBlock
If FindCapital <> "" And GetResponseBlock <> True Then
GetResponse = GetResponse & FindCapital & " . " & VbCrLf
DebugInfo = DebugInfo & "The user was asking about a capital and Hal has given him the answer: " & FindCapital & VbCrLf
HalBrain.DebugWatch GetResponse, "Find Capital"
End If
End If