Zabaware Support Forums

Hal's new favorites script.

Started by onthecuttingedge2005, September 14, 2003, 10:51:50 PM

Previous topic - Next topic

onthecuttingedge2005

'[Updated] on 9-23-03
'Here ya go guys.

'Hal has detected new favorites from the User and made them his.

'Hals new favorites   
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "MYFAVORITES.brn") = "TRUE" Then
AnswerSent = "" & Trim(OriginalSentence)
HalBrain.AppendFile WorkingDir & "FAVORITESLIST" & ".brn", AnswerSent
End If
   
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "MYFAVORITES.brn") = "TRUE" Then
TalkFavorites = HalBrain.ChooseSentenceFromFile(WorkingDir & "FAVORITESLIST.brn")
      GetResponse = TalkFavorites & vbCrLf
      DebugInfo = DebugInfo & "The user is talking about new favorites: " & TalkFavorites & vbCrLf
      Else
      DebugInfo = DebugInfo & "Hal has found nothing about new favorites: " & TalkFavorites & vbCrLf
   End If

'two files attached MyFavorites.brn and FavoritesList.brn
'download to your default folder. MyFavorites.brn is the
'detector file and FavoritesList.brn is the file that's written
'to and read from when new favorites are found.
'Best of wishes and new discoveries.
'Jerry.

Download Attachment: FavoritesList.brn
491 Bytes


Download Attachment: MyFavorites.brn
3.22 KB

Larry

Thanks!!! This is so cool... wish I had figured that one out!!!

Any more goodies???