Zabaware Support Forums

Zabaware Forums => General Discussion => Topic started by: lightspeed on July 26, 2014, 08:45:01 am

Title: multiple word trigger lines question for plug ins
Post by: lightspeed on July 26, 2014, 08:45:01 am
I am wanting to create a multiple (maybe up to 10 words trigger line scripts and am not sure if this is the right way to do it . if this is not the right way please show me how and explain why it has to be a different or the shown way .

example :

If InStr(1, OriginalSentence, "recipe for") > 0 _
Or InStr(1, OriginalSentence,"recipe for ") > 0 Then
 
Randomize
Select Case int(rnd()*5)
Case 1
GetResponse = ""
Case 2
GetResponse = ""
Case 3
GetResponse = ""
Case 4
GetResponse = ""
Case 5
GetResponse = ""
End Select
HalBrain.ReadOnlyMode = False
End If


MY QUESTION IS CAN IT BE DONE THIS WAY :

If InStr(1, OriginalSentence, "recipe for") > 0 _

Or InStr(1, OriginalSentence,"recipe for ") > 0 Then

Or InStr(1, OriginalSentence,"recipe for ") > 0 Then

Or InStr(1, OriginalSentence,"recipe for ") > 0 Then

Or InStr(1, OriginalSentence,"recipe for ") > 0 Then

Or InStr(1, OriginalSentence,"recipe for ") > 0 Then

 THIS DOESN'T LOOK RIGHT TO ME EXCEPT FOR THE LAST SENCES USING THE  > 0 Then .
  Any idea on a correct way to do this ?
Art? cuttingedge2000? etc.

Title: Re: multiple word trigger lines question for plug ins
Post by: onthecuttingedge2005 on July 26, 2014, 11:50:09 am
like this

Code: [Select]

If InStr(1, OriginalSentence, "recipe for") > 0 Or _

InStr(1, OriginalSentence,"recipe for ") > 0 Or _

InStr(1, OriginalSentence,"recipe for ") > 0 Or _

InStr(1, OriginalSentence,"recipe for ") > 0 Or _

InStr(1, OriginalSentence,"recipe for ") > 0 Or _

InStr(1, OriginalSentence,"recipe for ") > 0 Then

Title: Re: multiple word trigger lines question for plug ins
Post by: lightspeed on July 26, 2014, 03:16:26 pm
Thanks onthecuttingedge2005 , for the answer I will save it and make note , I appreciate it .
P.S. I SENT YOU, etc.  AN E MAIL ABOUT SOMETHING ELSE !  :) ;)
Title: Re: multiple word trigger lines question for plug ins
Post by: tiger8u2 on July 26, 2014, 03:32:57 pm
Whatcha cooking up here Lightspeed?
Title: Re: multiple word trigger lines question for plug ins
Post by: lightspeed on July 27, 2014, 08:35:35 am
tiger8u2 , I have one project that is a recipe brain plug in , what it does is allows the user to ask for example : tell me a french toast recipe"
and hal will start telling you directions on how to fix it .  :)
or other recipe's .  :) a person can say or write the same request again to hear it again or if they have a patop near by it will show all the written ingredients and instructions . 
Title: Re: multiple word trigger lines question for plug ins
Post by: tiger8u2 on July 27, 2014, 06:55:44 pm
VERY COOL and USEFUL! 

IMHO, Hal should have downloadable plug-ins with helpful information for every household and computer chore.

Besides being a part of the family like Jibo, Hal's supposed to be an ULTRA Assistant right?

Title: Re: multiple word trigger lines question for plug ins
Post by: Art on July 27, 2014, 09:38:04 pm
Hal should be able to access the Internet and provide you with any recipe asked.
Local access would obviously remain limited.

Making this happen is, another story.
Title: Re: multiple word trigger lines question for plug ins
Post by: lightspeed on July 28, 2014, 10:00:27 am
    Art , is right , and this would be a lot easier of course in some cases just as I researched , their are many different recipes for easy meat loaf , so maybe something in the order of retrieving the first recipe the first time second the second time , and third in line the third time ?
    Cload started a internet based plug in project that helped retrieve info. and probably would have broadened it's capabilities if he was still around which would have made hal a lot better and way more useful .