Rem Type=Plugin
Rem Name=Test Database
Rem Author=AS
Rem Host=Assistant
'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
lblPlugin(0).Caption = "Test DB"
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub
'_________________________________________________
Rem PLUGIN: PLUGINAREA6
HalBrain.ReadOnlyMode = False
If Instr(1, OriginalSentence, "Please store this", vbTextCompare) > 0 Then
If HalBrain.CheckTableExistence("QuetionsAnswers") = False Then HalBrain.CreateTable "QuetionsAnswers", "Brain", ""
'HalBrain.CreateTable TableName, TableType, ParentName
If HalBrain.CheckTableExistence("QuetionsAnswers") = True Then HalBrain.AddToTable "QuetionsAnswers", "Brain", "Do you like chickens?", "Yes, I love chickens."
'HalBrain.AddToTable TableName, TableType, Question, Answer
__________________________________________________
If HalBrain.CheckTableExistence("LotsofSentences") = False Then HalBrain.CreateTable "LotsofSentences", "Sentence", ""
'HalBrain.CreateTable TableName, TableType, ParentName
If HalBrain.CheckTableExistence("LotsofSentences") = True Then HalBrain.AddToTable "LotsofSentences", "Sentence", "All people from Alabama eat their cousins.", ""
'HalBrain.AddToTable TableName, TableType, AnyOldSentence, ""
__________________________________________________
If HalBrain.CheckTableExistence("SubjectsandTopics") = False Then HalBrain.CreateTable "SubjectsandTopics", "TopicSearch", ""
'HalBrain.CreateTable TableName, TableType, ParentName
If HalBrain.CheckTableExistence("SubjectsandTopics") = True Then HalBrain.AddToTable "SubjectsandTopics", "TopicSearch", "Somebody got shot.", "A murder has taken place."
'HalBrain.AddToTable TableName, TableType, SearchSubject, RelatedTopic
__________________________________________________
If HalBrain.CheckTableExistence("LotsofPatterns") = False Then HalBrain.CreateTable "LotsofPatterns", "PatternMatch", ""
'HalBrain.CreateTable TableName, TableType, ParentName
If HalBrain.CheckTableExistence("LotsofPatterns") = True Then HalBrain.AddToTable "LotsofPatterns", "PatternMatch", "DOG CAT HOUSE", "We have many dogs and cats in our house."
'HalBrain.AddToTable TableName, TableType, SearchPattern, RelatedResponse
_______________________________________________
If HalBrain.CheckTableExistence("LotsofCorrections") = False Then HalBrain.CreateTable "LotsofCorrections", "Substitution", ""
'HalBrain.CreateTable TableName, TableType, ParentName
If HalBrain.CheckTableExistence("LotsofCorrections") = True Then HalBrain.AddToTable "LotsofCorrections", "Substitution", "Please forgive I.", "Please forgive me."
'HalBrain.AddToTable TableName, TableType, SearchPhrase, CorrectedPhrase
End If
This will show you how to both save to and understand the tables.
Told ya I was go'n to do it.... :-P