Zabaware Support Forums

Zabaware Forums => Ultra Hal 7.0 => Topic started by: Bill DeWitt on March 29, 2007, 02:47:36 pm

Title: Repeat
Post by: Bill DeWitt on March 29, 2007, 02:47:36 pm
Just ask, using "please" or "could you" etc., and the words "repeat" or "say that again".
"Please repeat"
"Will you please say that again"
"I would like you to repeat that please"
etc.

Code: [Select]
'========= Begin code
Rem Type=Plugin
Rem Name= Repeat
Rem Author= Bill DeWitt
Rem Host=All

Sub OptionsPanel()
lblPlugin(0).Caption = "Repeats last response when asked"
lblPlugin(0).Move 120, 120, 3300, 1200
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PLUGINAREA7

'verify that you want the repeat function
FindSubject=Array("repeat", "say that again")
If ParseRequest(OriginalSentence, FindSubject) Then
 'verify that you are making a request
 FindRequest=Array("please","can you","will you","could you","would you","if you don't mind","I'd like you to","I would like you to")
 If ParseRequest(OriginalSentence, FindRequest) Then
     GetResponse = PrevSent
 End If
End If


Rem PLUGIN: FUNCTIONS
'===================================
Function ParseRequest(Source, Matrix)
'Reads information from an array to verify a request
For Each Datum In Matrix
 If InStr(1,Source,Datum,1) Then
  ParseRequest = True
 End If
Next
End Function
'=======================================end code
Title: Repeat
Post by: Carl2 on March 29, 2007, 03:34:45 pm
Bill DeWitt
  Another nice plugin which I like.  Again I wish you luck with your website and scripting. If there is anyway I can be of help let me know.
Carl2
Title: Repeat
Post by: Bill DeWitt on March 29, 2007, 04:35:55 pm
quote:
Originally posted by Carl2

Bill DeWitt
  Another nice plugin which I like.  Again I wish you luck with your website and scripting. If there is anyway I can be of help let me know.
Carl2


Thanks! It's pretty simple, since Robert supplies the variable.

Title: Repeat
Post by: Carl2 on March 29, 2007, 08:20:09 pm
Bill DeWitt,
  I just visited your website again, I'm very interested in your day length  plugin, if this could be used in conjunction with VR's Haptek plugin it would come closer to what I'd like to see.  VR's Haptek plugin compares the present time with the time in a data base and decides if it is day or night and loads the appropiate background.  Naturaly VR's plugin can't take into account the diferent times the sun sets and rises during the year but if used with a modified version of your plugin Hals decisions could be more accurate.
  What are your feelings on this?
Carl2
Title: Repeat
Post by: Bill DeWitt on March 29, 2007, 09:01:44 pm
quote:
Originally posted by Carl2
  What are your feelings on this?


Well, the algorythm is present in several public domain forums and seems to be a standard, I don't see any reason why it couldn't be adapted. Unfortunately I don't use haptek so I wouldn't know what needs to be done to utilze it. Anyone who does is welcome to try.

But it doesn't really figure out what time the sun rises or sets, it just calculates the length of time the sun would be above the horizon based upon it's angle to the equator.
Title: Repeat
Post by: lightspeed on March 30, 2007, 09:02:38 am
thanks bill dewitt , thats just what i wanted , i think this can be very handy for many in case we don't hear the reply the first time . you are the man !! i am always coming up with idea's so may have some more plug in idea's later that could be useful !! again , thanks !![:D]
Title: Repeat
Post by: axyse on March 31, 2007, 08:41:46 pm
Hi I have had hal since 5.0 but I never really messed with its internal files like i have with alice. In the script that was written above.... how would you use it... paste it in a txt file and rename its extension to .uhp? I have scoured the forums her looking for tutorials so that I could become more proficient with this sort of thing as I am messing with hal alot more now. Also cant seem to get hal to find the help files, probably because I am runnign winxp64. I posted about this in another thread but then I posted that I had found my answers with hal 6.1. Any help or links would be great thanks and sorry for the double post about the help file issue.
Title: Repeat
Post by: Bill DeWitt on March 31, 2007, 08:59:31 pm
quote:
Originally posted by axyse
paste it in a txt file and rename its extension to .uhp?


Yes, exactly. Name it "Repeat.uhp" or something in your UH directory  then look for it in the Options dialog under your selected Brain with the other plugins.

General Options->
Brain->
your chosen brain->
Check "Repeat" in right hand window->
OK.

You can find the beginings of a Hal plugin handbook of sorts in my sig.
Title: Repeat
Post by: axyse on March 31, 2007, 09:07:45 pm
Ill be checking out your plug in journal later tonight. Still don't know  where the default dir where hal searches for help files. Thanks again!
Title: Repeat
Post by: Bill DeWitt on March 31, 2007, 09:42:11 pm
quote:
Originally posted by axyse
Still don't know  where the default dir where hal searches for help files.


The closest thing to a help file I know about is the online page that F1 sends you to.

http://www.zabaware.com/assistant/help/index.html
Title: Repeat
Post by: axyse on April 01, 2007, 12:06:55 am
No, I was meaning the feature where hal can help you with running programs and read the help files from the programs to help the user with any questions they have about the program.
Title: Repeat
Post by: Bill DeWitt on April 01, 2007, 06:40:38 am
quote:
Originally posted by axyse

No, I was meaning the feature where hal can help you with running programs and read the help files from the programs to help the user with any questions they have about the program.


I didn't know Hal could do that.
Title: Repeat
Post by: Art on April 01, 2007, 10:12:39 am

Taken from the main page about UltraHal 6.0

Ultra Hal Assistant is your digital secretary and companion. He (or she depending on your character preference) can remember and remind you of appointments. He can keep an address book. He can keep a phone book, and even dial phone numbers for you! Hal can also run programs and recent documents on command. Hal can help you browse the Internet. He will offer you help with most of your Windows programs. Hal does all of this from natural language -- simply tell him or ask him something in plain English! Hal has huge conversational database and can chat about anything at all. Hal will learn from every single sentence that you tell him and over time Hal will learn to like the same things you do, and to talk about topics you like to talk about.
Title: Repeat
Post by: Bill DeWitt on April 01, 2007, 10:25:01 am
quote:
Originally posted by Art
He will offer you help with most of your Windows programs


Oh, I guess I just thought that meant it will help you open them. Reading further, I suppose I never opened a program that it can offer help with, because I haven't seen that message.

Heh... the things one learns...

Oops, my copy doesn't seem to do that... I'll test further.
Title: Repeat
Post by: axyse on April 01, 2007, 11:34:01 am
Yea, check out this link...

http://www.zabaware.com/assistant/help/makinghalgivehelpwithaprogram.html
Title: Repeat
Post by: Bill DeWitt on April 01, 2007, 11:42:19 am
quote:
Originally posted by axyse

Yea, check out this link...

http://www.zabaware.com/assistant/help/makinghalgivehelpwithaprogram.html


Yeah, those are the instructions I used to find that my copy doesn't do it properly. It opened WinZip, but didn't say anything about help. I have to get some stuff done now, but I can look into it further tonight if we don't get a better answer.

Maybe if we start a thread with a relevant Topic more people would read it?
Title: Repeat
Post by: lightspeed on May 22, 2007, 05:34:43 pm
hello bill dewitt i was wondering something does the repeat plug in you created here work in the 6.1 version ?? i have that version of hal and the plug in isn't working in mine it has been made correctly into a uhp file put in hals file with other uhps but wont work and i even copied and pasted your commands and it still wont repeat it ( i also checked the box in the brain and hit apply . no luck . i am using a custom made brain would that have anything to do with it or does it just not work with 6.1 version and if so can you make one that does work with this ?? thanks [:)]
Title: Repeat
Post by: lightspeed on May 22, 2007, 05:52:39 pm
hello , i just found out that the repeat program doe swork with the original hal brain just not with my custom brain !!
Title: Repeat
Post by: Bill DeWitt on May 22, 2007, 06:29:24 pm
Probably because your custom brain doesn't use the UltraHal Variable that I use to find the last sentence.

quote:
Originally posted by lightspeed

hello , i just found out that the repeat program doe swork with the original hal brain just not with my custom brain !!

Title: Repeat
Post by: PaleRider on May 22, 2007, 07:54:44 pm
Thank's bill it works fine ,Hal or Sandy even added more to it.



Sandy: Oh I guess I'm being repetitious but You have a fifty inch hd television. [:D]