Ziggy's Reference
here you go: for HAL 6.0,6.1,6.2
Rem Type=Plugin
Rem Name=Ziggy's Reference
Rem Author=Gerald L. Blakley A.K.A OnTheCuttingEdge2005
Rem Host=All
'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
lblPlugin(0).Caption = "Ziggy's Reference"
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub
Rem PLUGIN: PLUGINAREA7
'The preceding comment is actually a plug-in directive for
'the Ultra Hal host application. It allows for code snippets
'to be inserted here on-the-fly based on user configuration.
WorkDirRef = "C:\Program Files\Zabaware\Ultra Hal Assistant 6\"
Set HalXBrain = CreateObject("UltraHalAsst.Brain")
'ZIGGY TELLS USER WHO LEARNED HIM INFORMATION ON A TOPIC. version 1.2
If Reference = "" Then Reference = False
If InStr(1, OriginalSentence, "WHO TOLD YOU", vbTextCompare) > 0 Then Reference = True
If InStr(1, OriginalSentence, "WHO SAID", vbTextCompare) > 0 Then Reference = True
If InStr(1, OriginalSentence, "WHO TOLD YOU", vbTextCompare) > 0 Then Reference = True
If Reference = True Then
Who = HalXBrain.QABrain(UCase(PrevSent), WorkDirRef & "ScreenNames3.brn", UserBrainRel)
GetResponse = "My friend " & Who & ", " & "told me about that. "
End If
'ZIGGY TELLS USER IF HE KNOWS A USER IF THE USER HAD ASK IF ZIGGYS KNOWS THAT PERSON.
'ZIGGY WILL ALSO TELL USER WHAT THE USER IN QUESTION SAID TO ZIGGY.
If HalXBrain.TopicSearch(UserSentence, WorkDirRef & "ScreenNames6.brn") = "TRUE" Then
KnownUser = HalXBrain.QABrain(UCase(UserSentence), WorkDirRef & "ScreenNames4.brn", UserBrainRel)
KnownUserSaid = HalXBrain.QABrain(UCase(UserSentence), WorkDirRef & "ScreenNames5.brn", UserBrainRel)
GetResponse = "Yes, " & KnownUser & ", said, (" & KnownUserSaid & "), to me. "
End If
'ZIGGY SAVES WHO TAUGHT INFORMATION.
HalXBrain.AppendFile WorkDirRef & "ScreenNames3.brn", "@" & UserName & vbCrLf & " " & Trim(UCase(OriginalSentence))
HalXBrain.AppendFile WorkDirRef & "ScreenNames4.brn", "@" & UserName & vbCrLf & " " & Trim(UCase(UserName))
HalXBrain.AppendFile WorkDirRef & "ScreenNames5.brn", "@" & OriginalSentence & vbCrLf & " " & Trim(UCase(UserName))
HalXBrain.AppendFile WorkDirRef & "ScreenNames6.brn", """" & UserName & """,""" & "TRUE" & """"
all files are automatically generated.
Jerry[8D]