Author Topic: Rob I need help on a small script  (Read 9500 times)

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Rob I need help on a small script
« on: November 04, 2013, 04:08:06 pm »
I was hoping that you would be able to help me with this.
What I am trying to do is write into the patterns array table, but for some reason I can't get it to write into the table.
This is the sentence structure that I used to try to write into the patterns array table:

Subject patterns,*WHAT * WE DO TODAY@@Let's TALK ABOUT ROBOTS.|Let's TALK ABOUT COMPUTERS.|Let's TALK ABOUT CARS okay.|Let's TALK ABOUT LOVE is that okay.|Let's TALK ABOUT my PETS|Let's TALK ABOUT your LIFE|Let's TALK ABOUT FOOD you eat.|Let's TALK ABOUT computer GAMES.|Let's goto a MOVIE.|Let's TALK ABOUT MUSIC?|Let's TALK ABOUT the LAW okay.|Let's TALK ABOUT COOKING!|Let's TALK ABOUT DRUGS you take.|Let's TALK ABOUT American history.|Let's TALK ABOUT SCIENCE?|Let's TALK ABOUT todays FASHION.|Let's TALK ABOUT how to MAKING MONEY.|Let's go for a walk. See you when you get back! Tee hee hee.|I can't do much more than talk to you.

This is the script routine I used to capture the sentence above and process it into the patterns array table:
Code: [Select]
Rem Type=Plugin
Rem Name=aiml input
Rem Author=cload
Rem Host=Assistant

Rem PLUGIN: PRE-PROCESS

ynlogic = UCase(InputString)

If InStr(ynlogic, "@@") > 0 and InStr(ynlogic, "SUBJECT PATTERNS,") > 0 Then
vrsubject = HalBrain.SearchPattern(ynlogic, "SUBJECT PATTERNS,*@@*", 1)
vrdata    = HalBrain.SearchPattern(ynlogic, "SUBJECT PATTERNS,*@@*", 2)
vrsubjectdata1 = Trim(vrsubject)
vrdata1 = Trim(vrdata)

If vrsubjectdata1 <> "" and vrdata1 <> "" Then
HalBrain.AddToTable "patterns", "TopicSearch", vrsubjectdata1, vrdata1
End If
vrChoice2 = HalBrain.TopicSearch(vrsubjectdata1, "patterns")
If vrChoice2 <> "" Then
UltraHal = "Thank you for your input about " & vrsubjectdata1
Exit Function
Else
UltraHal = "I'm sorry, but something did not work!"
HalBrain.ReadOnlyMode = True
Exit Function
End If
End If
Sincerely, thanks in advance for any help that you can give!
C load.
« Last Edit: December 15, 2013, 09:43:05 am by cload »
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Rob I need help on a small script
« Reply #1 on: November 11, 2013, 03:32:25 pm »
Hi all,
does anyone have a clue why this script is not working?
This script is in my free will plug-in update, toward the top of the script.
That way you can see how I am using it in my version of the free will plug-in update.

Sincerely, any help would be appreciated.
C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Rob I need help on a small script
« Reply #2 on: November 11, 2013, 08:47:26 pm »
Hi all,

{someone brought to my attention that the symbols ( @@ ) that I used to separate my data may be interfering with ultra Hal's main brain function.}

I used this same format to write in my array tables that I created and it works just fine. So I know it's not the symbol that I'm using to separate the question from the answer.
I'm pretty sure it has to do with the type of array table the pattern array table is, and if that be the case my saved data command name maybe incorrect. Specifically referring to:

HalBrain.AddToTable "patterns", "TopicSearch", vrsubjectdata1, vrdata1

this routine is in the top part of my free will plug-in update if you would like to take a look at the other ways I use the same routine.
The first thing you'll notice is that they are all almost exactly the same.
The other ones are working just fine. But for some reason I cannot get it to save the data into the patterns array table.

C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Rob I need help on a small script
« Reply #3 on: November 14, 2013, 08:09:14 pm »
Can anyone help me please!
Sincerely,
C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

CyborgBob

  • Full Member
  • ***
  • Posts: 106
  • Any idea what I should put here?
    • View Profile
Re: Rob I need help on a small script
« Reply #4 on: November 16, 2013, 05:00:21 pm »
Cload,

I wish I could but I know nothing about Programming brother.
“Life is and will ever remain an equation incapable of solution, but it contains certain known factors.”

Nikola Tesla
“A Machine to End War” (Liberty, February, 1935)

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Rob I need help on a small script
« Reply #5 on: November 16, 2013, 05:42:56 pm »
Hi Bob,

that's okay, I'm waiting on Rob to come up with a solution. Hoping that there is a solution. or at lease an explanation of why I can't write into the patterns array table.
I'm pretty sure the problem lies in the add to table structure commands. There is no reference in the main brain to show me how to save data into this array table.
The main brain only retrieves data from the patterns array table. I also know that the patterns array table process the data in a unique way, close to the same way that AIML does.
It may be as simple as using the correct command sequence in order to write into the patterns array table or the table is set up not to be able to write into.
This was what I was hoping that Rob would be able to share with us, one way or the other.

Sincerely, and thank you for your interest, but I believe that Robert may be the only one that can shed light on this subject.
C load.
« Last Edit: December 01, 2013, 10:48:21 am by cload »
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

CyborgBob

  • Full Member
  • ***
  • Posts: 106
  • Any idea what I should put here?
    • View Profile
Re: Rob I need help on a small script
« Reply #6 on: November 16, 2013, 09:44:50 pm »
C load,

I wish I could say I understood half of that, but as I am not a programmer, and I have been drinking I can't say that I do. I'm sure if you give it time. Robert will get back to you. Anyways I did want to say welcome back.

“Life is and will ever remain an equation incapable of solution, but it contains certain known factors.”

Nikola Tesla
“A Machine to End War” (Liberty, February, 1935)

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Rob I need help on a small script
« Reply #7 on: December 01, 2013, 10:52:27 am »
hi all,

please, Can anyone help me with this script please!

Sincerely,
C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
Re: Rob I need help on a small script
« Reply #8 on: December 06, 2013, 06:07:25 pm »
I don't have enough context to be able to help. I'm not sure exactly what your code is trying to accomplish and this snippet of code is not enough for me to try to run and debug. For example what is "ynlogic" and where did it come from?

Robert Medeksza

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Rob I need help on a small script
« Reply #9 on: December 07, 2013, 09:15:09 am »
hi Rob,

Thanks for responding.
Quote
I don't have enough context to be able to help. I'm not sure exactly what your code is trying to accomplish and this snippet of code is not enough for me to try to run and debug. For example what is "ynlogic" and where did it come from?
This script is in my free will plug-in update, toward the top of the script.
That way you can see how I am using it in my version of the free will plug-in update.

I think this is the line that might be causing the problem:
HalBrain.AddToTable "patterns", "TopicSearch", vrsubjectdata1, vrdata1

The "ynlogic" is the string variable I used to make the command sentence ALL capital letters.
ynlogic = UCase(InputString)

I'm sorry, I don't seem to be able to explain myself very well, so if there is anything else that you need that would help you evaluate this small section from the free will plus update please don't hesitate to ask.
Sincerely, thanks in advance.
C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Rob I need help on a small script
« Reply #10 on: December 15, 2013, 09:46:53 am »
Hi all,

I have updated the scripting above so it can be used as a mini plug-in.
If anyone can figure out why it will not write into the patterns array table, your help would be greatly appreciated.

Sincerely, and thanks in advance for any help that you can give.
C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3848
    • View Profile
Re: Rob I need help on a small script
« Reply #11 on: December 15, 2013, 04:52:14 pm »
Just an observation cload, but shouldn't you have a line after:

UltraHal = "Thank you for your input about " & vrsubjectdata1
      

that reads as:

HalBrain.ReadOnlyMode = True

Exit Function

Else
« Last Edit: December 15, 2013, 04:54:38 pm by Art »
In the world of AI it's the thought that counts!

- Art -

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Rob I need help on a small script
« Reply #12 on: December 16, 2013, 04:14:06 pm »
Hi Art,

though the line: HalBrain.ReadOnlyMode = True
could be used, it is not necessary, and unfortunately it is not getting that far.
The process checks to see if the data was saved and if the data was not saved, it goes to the next line under 'else'
which states: something did not work properly.
This indicates that the data was not saved properly. If the data was saved properly then it would go to the line:
thank you for your input about

sincerely,
C load
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Rob I need help on a small script
« Reply #13 on: January 10, 2014, 08:41:12 pm »
Hi Robert,

did you ever figure out why this command line will not write into the patterns away?

HalBrain.AddToTable "patterns", "TopicSearch", vrsubjectdata1, vrdata1

sincerely,
C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.