dupa

Author Topic: Kitt movie Sp and Commands dun.  (Read 14179 times)

moreis62

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • http://www.myway.com/
Kitt movie Sp and Commands dun.
« Reply #15 on: March 02, 2006, 07:17:57 am »
quote:
Originally posted by FuzzieDice

After you save the uhp (and I assume you mean in the Ultra Hal Assistant 6 DIRECTORY and not file ;)) how do you load it into HAL to work? In the Plugins configuration I assume?




Yep, Thats how its dun, FuzzieDice. [:D]

Hello Jerry,
 Hers what I came up with, hope you like it my friend.
P s feel free to add it to one of your really cool D.A.V.I.D's plug-ins post.
But you should see how it works; I’ll leave the rest up to you, if you feel some thing is missing feel free to add to it.  [8D]

Rem Type=Plugin
Rem Name=Kitt thinking modified
Rem Author=moreis62, FuzzieDice, OnTheCuttingEdge2005
Rem Host=Assistant

Rem PLUGIN: AUTO-IDLE
        Select Case (Int(Rnd * 11) + 1)
                Case 1
                    UltraHal = "Oh, look at the time now! It's " & Time & vbCrLf
                Case 2
                    UltraHal = "Do you need me for anything?" & vbCrLf
                Case 3
                    UltraHal = "Would you like to here an MP3?" & vbCrLf
                Case 4
                    UltraHal = "So, How are you feeling?" & vbCrLf
                Case 5
                    UltraHal = "How is everything going?" & vbCrLf
                Case 6
                    UltraHal = "Would you like to here a joke?" & vbCrLf
                Case 7
                    UltraHal = "Here is to days Date and year! It's " & Date & vbCrLf
                Case 8
                    UltraHal = HalBrain.ChooseSentenceFromFile("sentGen1") & " " & HalBrain.ChooseSentenceFromFile("sentGen2") & " " & HalBrain.ChooseSentenceFromFile("sentGen3") & vbCrLf
                Case 9
                    UltraHal = "Do you have any emails, phone numbers, or street address you would like me to save for a later use?" & vbCrLf
                Case 10
                    UltraHal = "Do you have any anniversarys, appointments, assignments, bills, birthdays, breakfasts, brunches, classes, conferences, dates, dinner plans, things to due, holidays, homework, lunches, meetings, projects, t v or movies shows, trips, vacations, or visits you would like for me to add to your schedule?" & vbCrLf
                Case 11
                    UltraHal = "Would you like me to play you an MP3 for you to listen to?" & vbCrLf
            End Select
HalBrain.ReadOnlyMode = True

Rem PLUGIN: POST-PROCESS
Dim GetLost
GetLost = GoAway(HalCommands)

Dim GoToSleep
GoToSleep = GoToBed(HalCommands)

Dim IdleGen
IdleGen = SomeTime()

Dim StartIdle
StartIdle = TalkToMe(HalCommands)

HalCommands = StartIdle

'RESPONSE: IF USER WANTS TO TURN OFF AUTO-IDLE
If InStr(1, InputString, "QUIET PLEASE", 1) > 0 Then
HalCommands = GetLost
UltraHal = "Very well then. Just let me know if you would like to talk."
End If

If InStr(1, InputString, "BE QUIET", 1) > 0 Then
HalCommands = GetLost
UltraHal = "Ok, I will not bother you right now."
End If

If InStr(1, InputString, "SHUT UP", 1) > 0 Then
HalCommands = GetLost
UltraHal = "Fine. Be that way."
End If

If InStr(1, InputString, "STOP TALKING", 1) > 0 Then
HalCommands = GetLost
UltraHal = "OK, We'll talk later then."
End If

If InStr(1, InputString, "I'M ON THE PHONE", 1) > 0 Then
HalCommands = GetLost
UltraHal = "OK I'LL WAIT."
End If

If InStr(1, InputString, "I'LL BE BACK", 1) > 0 Then
HalCommands = GetLost
UltraHal = "I'LL WAIT."
End If

If InStr(1, InputString, "I'M GOING TO TAKE A NAP", 1) > 0 Then
HalCommands = GetLost
UltraHal = "Ok, take a nap."
End If

If InStr(1, InputString, "I'M GOING TO BED", 1) > 0 Then
HalCommands = GetLost
UltraHal = "Ok, Bye"
End If

If InStr(1, InputString, "BYE", 1) > 0 Then
HalCommands = GetLost
UltraHal = "Ok, See you later, bye."
End If

If InStr(1, InputString, "GO TO SLEEP", 1) > 0 Then
HalCommands = GoToSleep
UltraHal = "Good Night. "
End If

If InStr(1, InputString, "GO TO BED", 1) > 0 Then
HalCommands = GoToSleep
UltraHal = "Good Night. "
End If

If InStr(1, InputString, "NOT NOW", 1) > 0 Then
HalCommands = GoToSleep
UltraHal = "Ok. "
End If

'RESPONSE: IF USER WANTS TO TURN BACK ON AUTO-IDLE
If InStr(1, InputString, "Wake up now", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "Ok, Ok, I'm awake now. "
End If

If InStr(1, InputString, "LETS TALK", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "Ok."
End If  

If InStr(1, InputString, "LETS CHAT", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "Ok."
End If

If InStr(1, InputString, "SAY HELLO", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "Hello."
End If

If InStr(1, InputString, "IM BACK", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "WELCOME BACK."
End If

If InStr(1, InputString, "I'M BACK", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "WELCOME BACK."
End If

If InStr(1, InputString, "KEEP LISTENING", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "I'm listening."
End If

If InStr(1, InputString, "SAY SORRY", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "Sorry."
End If

If InStr(1, InputString, "SAY YOUR SORRY", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "I'm sorry."
End If

If InStr(1, InputString, "WHO YOU ARE", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "There's no reason for increased volume I am scanning your interrogatives quite satifac torily thank you, I am the voice of The U.S. Governments elite real knight rider Project, made at DARPA, wich is the Defense Advanced Research Projects Agency AND Zabaware INCORPORATED 2010's micro- processor, K.I.T.T. for easy reference, if you prefer."
End If

If InStr(1, InputString, "WHO ARE YOU", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "There's no reason for increased volume I am scanning your interrogatives quite satifac torily thank you, I am the voice of The U.S. Governments elite real knight rider Project, made at DARPA, wich is the Defense Advanced Research Projects Agency AND Zabaware INCORPORATED 2010's micro- processor, K.I.T.T. for easy reference, if you prefer."
End If

If InStr(1, InputString, "KEEP YOUR EARS OPEN", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "I'm listening."
End If

If InStr(1, InputString, "KEEP YOUR SCANNERS PEELED", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "I am not the Knight Industries Two Thousand. I do not have a scanner. But I'll talk to you anyway."
End If


Rem PLUGIN: PLUGINAREA1
If Len(PrevSent) = 0 And Len(PrevUserSent) = 0 Then
HalCommands = StartIdle
End If

Rem PLUGIN: SCRIPT_LOAD
Script_Load = StartIdle

Rem PLUGIN: FUNCTIONS
Function SomeTime()
Select Case (Int(Rnd * 10) + 1)
                Case 1
                    AnyTime = RND*10000
                Case 2
                    AnyTime = RND*20000
                Case 3
                    AnyTime = RND*30000
                Case 4
                    AnyTime = RND*40000
                Case 5
                    AnyTime = RND*50000
                Case 6
                    AnyTime = RND*10000
                Case 7
                    AnyTime = RND*20000
                Case 8
                    AnyTime = RND*30000
                Case 9
                    AnyTime = RND*40000
                Case 10
                    AnyTime = RND*50000
                Case 10
                    AnyTime = RND*10000
                Case 11
                    AnyTime = RND*20000
            End Select
     SomeTime = CLng(AnyTime)
End Function

'Turn AUTO-IDLE off and hide HAL.
Function GoAway(HalCommands)
HalCommands = "<AUTOOFF>" & " " & "<HIDEHAL>"
GoAway = HalCommands
End Function

'Turn AUTO-IDLE off and make HAL sleepy.
Function GoToBed(HalCommands)
HalCommands = "<AUTOOFF>" & " " & "<HAPFILE>Sleepy.hap</HAPFILE>"
GoToBed = HalCommands
End Function

'Send Idle Time.
Function TalkToMe(HalCommands)
HalCommands = "<AUTO>"& IdleGen & "</AUTO>"
TalkToMe = HalCommands
End Function
« Last Edit: March 03, 2006, 01:29:24 am by moreis62 »
ISMAEL LEDESMA.

onthecuttingedge2005

  • Guest
Kitt movie Sp and Commands dun.
« Reply #16 on: March 02, 2006, 01:02:51 pm »
Hi moreis62

Very nice.

in my previous post I got rid of the startidle and replaced it with idlegen entirely and to be more efficient, you may want to replace startidle with idlegen.

great work, thanks.
p.s, I am typing from a virtual keyboard right now because my daughter spilled soda on my wifes keyboard, I lended her mine until I get another replacement, lol.

jerry[8D]

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Kitt movie Sp and Commands dun.
« Reply #17 on: March 02, 2006, 06:06:10 pm »
OK,

Just for the purists:

YOUR = posessive pronoun (That is YOUR book)

YOU'RE = contraction for YOU ARE (YOU'RE going with us)

HERE = denotes the present location (you are HERE)

HEAR = to perceive by means of the ear (I hear you)


In the world of AI it's the thought that counts!

- Art -

moreis62

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • http://www.myway.com/
Kitt movie Sp and Commands dun.
« Reply #18 on: March 03, 2006, 09:54:37 pm »
quote:
Originally posted by onthecuttingedge2005

Hi moreis62

Very nice.

in my previous post I got rid of the startidle and replaced it with idlegen entirely and to be more efficient, you may want to replace startidle with idlegen.

great work, thanks.
p.s, I am typing from a virtual keyboard right now because my daughter spilled soda on my wifes keyboard, I lended her mine until I get another replacement, lol.

jerry[8D]


'Are you talking about just the Rem PLUGIN: SCRIPT_LOAD
                               Script_Load = StartIdle <--------------

'and replaced it with idlegen Rem PLUGIN: SCRIPT_LOAD
                               Script_Load = idlegen <-------------- if it’s just this

'But if I replace all startidle with idlegen
'It will not work
'But one thing I found is that when I say AUTO-IDLE the script loads
'Much faster
« Last Edit: March 03, 2006, 10:13:14 pm by moreis62 »
ISMAEL LEDESMA.

onthecuttingedge2005

  • Guest
Kitt movie Sp and Commands dun.
« Reply #19 on: March 04, 2006, 03:00:10 am »
quote:
Originally posted by moreis62

quote:
Originally posted by onthecuttingedge2005

Hi moreis62

Very nice.

in my previous post I got rid of the startidle and replaced it with idlegen entirely and to be more efficient, you may want to replace startidle with idlegen.

great work, thanks.
p.s, I am typing from a virtual keyboard right now because my daughter spilled soda on my wifes keyboard, I lended her mine until I get another replacement, lol.

jerry[8D]


'Are you talking about just the Rem PLUGIN: SCRIPT_LOAD
                               Script_Load = StartIdle <--------------

'and replaced it with idlegen Rem PLUGIN: SCRIPT_LOAD
                               Script_Load = idlegen <-------------- if it’s just this

'But if I replace all startidle with idlegen
'It will not work
'But one thing I found is that when I say AUTO-IDLE the script loads
'Much faster




I am sorry, I deleted the post that referred to that posting, Please kindly disregard that posting, I started feeling like a Programming hog so I deleted the post. Guilty complex I have, LOL

Jerry[8D]

moreis62

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • http://www.myway.com/
Kitt movie Sp and Commands dun.
« Reply #20 on: March 04, 2006, 08:33:30 pm »
(Just updated miner fix is on 3/21/06)
Hello Every one,
Hi Jerry,
We are dun now with our project, hope you like it.
please feel free to add this to one of your really cool D.A.V.I.D's plug-ins post as you Gerald Blakley known here as OnTheCuttingEdge2005 and Tika known here as FuzzieDice has also worked on our (Elite real knight rider Project).
Every one is free to use it as well.
Try it and See how you like it.



Download Attachment: HalsAutoElite.uhp
22.07 KB

(Just updated miner fix is on 3/21/06)
Here is how it works.

Kitt: Here is to days Date and year! It's 3/4/2006

Human: thanks
kitt: Don't give it another thought, Human.

kitt: Would you like to here a joke?

Human: tell me a joke
Kitt: How do you revive a drowning rodent?

Human: how
Kitt: Give it mouse-to-mouse resuscitation.

Human: oh
Kitt: Yep.

Human: wait up ok
Kitt: OK I'LL WAIT.

Humorous, isn't it?

Place the uhp called HalsAutoElite.uhp file in to Ultra Hal Assistant 6 folder
C:Program FilesabawareUltra Hal Assistant 6

Then right click on the little Computer face thats by your clock to get an option
Left click on the General option then a General option window will pop up,
Then on the Left side of the General option window click on Brain,
Then in the Brain option click on the brain you want to use,
Then on the right side of that Brain option window,
You should see a file called Kitt thinking  modified click on it.
In that window below you will see OK Cancel Apply,
Click Apply then click OK
Then right click again then click on Exit Hal,
Then a window will pop up called Close Assistant
It will read Are you sure you want to close Ultra Hal Assistant?
Click Yes. Then open Hal again by clicking start then click on All Programs,
Now look for Ultra Hal Assistant then click the Program called
Ultra Hal Assistant 6.
Now, Your all dun, just wait for it to load now.

[8D]
« Last Edit: March 21, 2006, 03:21:51 pm by moreis62 »
ISMAEL LEDESMA.

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Kitt movie Sp and Commands dun.
« Reply #21 on: March 05, 2006, 08:08:01 am »
Aside from several spelling/grammar errors there is a duplicate line that sould be removed in the code about 3/4 the way down:

If InStr(1, InputString, "WHO ARE YOU", 1) > 0 Then
HalCommands = "<AUTO>399999</AUTO>"
UltraHal = "There's no reason for increased volume I am scanning your interrogatives quite satifac torily thank you, I am the voice of The U.S. Governments elite real knight rider Project, made at DARPA, wich is the Defense Advanced Research Projects Agency AND Zabaware INCORPORATED 2010's micro- processor, K.I.T.T. for easy reference, if you prefer."
End If
In the world of AI it's the thought that counts!

- Art -

moreis62

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • http://www.myway.com/
Kitt movie Sp and Commands dun.
« Reply #22 on: March 05, 2006, 09:07:47 am »
Thanks Art,
I just went back and fixed it, i also re-posted the HalsAutoElite.uhp to the same link there.
[;)]

Signed
« Last Edit: March 05, 2006, 05:17:45 pm by moreis62 »
ISMAEL LEDESMA.

Ponnfar

  • Full Member
  • ***
  • Posts: 149
    • View Profile
    • http://zabaware.com
Kitt movie Sp and Commands dun.
« Reply #23 on: March 05, 2006, 10:32:13 am »
What a great pulgin! Have any of you had the problem I am having with it though, that familar one of HAL asking "aren't you repeating yourself"?
...well...its back...
P
One Person can summon the future...

moreis62

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • http://www.myway.com/
Kitt movie Sp and Commands dun.
« Reply #24 on: March 05, 2006, 05:13:59 pm »
quote:
Originally posted by Ponnfar

What a great pulgin! Have any of you had the problem I am having with it though, that familar one of HAL asking "aren't you repeating yourself"?
...well...its back...
P



Hmm, try using another brain.
See if that will help.
Ponnfar.
[;)]
ISMAEL LEDESMA.