Author Topic: 6.1 <Yes><No> ?  (Read 2892 times)

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
6.1 <Yes><No> ?
« on: April 01, 2007, 09:08:08 pm »
Has anyone been able to get the tags <YES></YES> and <NO></NO> to work in 6.1?

As with 6.0, I seem to be able to get <YES> to work, but <NO> gives a YES answer. Here's my code:

Code: [Select]
Rem Type=Plugin
Rem Name=Know More
Rem Author= Bill DeWitt
Rem Host=Assistant

'-----------------------------------------------------------------
'This sub sets up the plug-ins option panel in Hal's options dialog
'-----------------------------------------------------------------
 
Sub OptionsPanel()
lblPlugin(0).Caption = "Would you like to know more?"
lblPlugin(0).Move 120, 120, 3300, 1200
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PLUGINAREA7
HalBrain.ReadOnlyMode = False
If InStr(1,OriginalSentence,"Hello Robot",1) Then
GetResponse = "Would you like to know more?<YES>"&SayYes()&"</YES><NO>"&SayNo()&"</NO>"
End If
HalBrain.ReadOnlyMode = True

Rem PLUGIN: FUNCTIONS
Function SayYes()
SayYes = "You made it!"
End Function

Function SayNo()
SayNo = "You munged it!"
End Function
« Last Edit: April 02, 2007, 12:46:37 pm by Bill DeWitt »


Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
6.1 <Yes><No> ?
« Reply #1 on: April 02, 2007, 11:58:08 am »
Hi Bill
I don't think your coding allows it to reach SayNo as it does not allow a fall through.
Bill
 

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
6.1 <Yes><No> ?
« Reply #2 on: April 02, 2007, 12:45:05 pm »
quote:
Originally posted by Bill819

Hi Bill
I don't think your coding allows it to reach SayNo as it does not allow a fall through.


Yeah, Hal is supposed to provide the conditional apparatus. The GetResponse string is parsed by Hal and the YES/NO tags are set up in a branching function. It stores the whole thing and then waits for your response. It should work.

If you have XP I would appreciate an actual test, because an XP user on another forum tested it this morning and it worked for him. He suggested that it might be a problem in my computer or my W2K installation.

As many tests as I can get would be a help. It may be a situation of different equipment gives different results.

TIA