dupa

Author Topic: Repeat  (Read 7511 times)

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Repeat
« 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


Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Repeat
« Reply #1 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
 

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Repeat
« Reply #2 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.

« Last Edit: March 29, 2007, 04:36:56 pm by Bill DeWitt »


Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Repeat
« Reply #3 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
 

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Repeat
« Reply #4 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.
« Last Edit: March 29, 2007, 09:17:59 pm by Bill DeWitt »


lightspeed

  • Hero Member
  • *****
  • Posts: 6763
    • View Profile
Repeat
« Reply #5 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]
 

axyse

  • Newbie
  • *
  • Posts: 35
    • View Profile
Repeat
« Reply #6 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.
 

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Repeat
« Reply #7 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.


axyse

  • Newbie
  • *
  • Posts: 35
    • View Profile
Repeat
« Reply #8 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!
« Last Edit: March 31, 2007, 09:33:53 pm by axyse »
 

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Repeat
« Reply #9 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


axyse

  • Newbie
  • *
  • Posts: 35
    • View Profile
Repeat
« Reply #10 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.
 

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Repeat
« Reply #11 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.


Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3853
    • View Profile
Repeat
« Reply #12 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.
In the world of AI it's the thought that counts!

- Art -

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Repeat
« Reply #13 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.
« Last Edit: April 01, 2007, 10:33:26 am by Bill DeWitt »


axyse

  • Newbie
  • *
  • Posts: 35
    • View Profile
Repeat
« Reply #14 on: April 01, 2007, 11:34:01 am »