Zabaware Support Forums

Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: onthecuttingedge2005 on August 17, 2005, 03:36:44 am

Title: Ziggy Pro Bot It/That to Current subject script.
Post by: onthecuttingedge2005 on August 17, 2005, 03:36:44 am
'This is for Ultra Hal 6 or greater only.
'This script is designed to change the words
'It and That to the current subject.
'This script helps Ziggy to keep on topic even when
'the topic is not mentioned in an (It) or (That) statement.

'ZIGGY PRO BOT, CHANGE (IT/THAT) TO CURRENT TOPIC.
      If Not WordIt <> "" Then WordIt = ""
      If InStr(1, OriginalSentence, " IT ", 1) > 0 Then WordIt = " IT "
      If InStr(1, OriginalSentence, " IT'S ", 1) > 0 Then WordIt = " IT'S "
      If InStr(1, OriginalSentence, " ITS ", 1) > 0 Then WordIt = " ITS "
      If InStr(1, OriginalSentence, " THAT ", 1) > 0 Then WordIt = " THAT "
      If InStr(1, OriginalSentence, " THAT'S ", 1) > 0 Then WordIt = " THAT'S "
      If InStr(1, OriginalSentence, " THATS ", 1) > 0 Then WordIt = " THATS "
      If WordIt <> "" Then RepIt = Replace(OriginalSentence, WordIt, CurrentSubject, 1, -1, vbTextCompare)
      If RepIt <> "" Then GetResponse = GetResponse & vbCrLf
      DebugInfo = DebugInfo & "Change the word (IT) or (THAT) to : " & CurrentSubject & vbCrLf

'No other files needed.
'Gerald L. Blakley [8D]