Zabaware Support Forums

6.1 <Yes><No> ?

Started by Bill DeWitt, April 01, 2007, 09:08:08 PM

Previous topic - Next topic

Bill DeWitt

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:

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


Bill819

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

Bill DeWitt

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