Author Topic: (solved) PLEASE SIMPLE QUICK SCRIPT HELP  (Read 4712 times)

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
(solved) PLEASE SIMPLE QUICK SCRIPT HELP
« on: January 28, 2009, 12:44:29 am »
GREETINGS EVERYONE***********

O.T.C.E. -  ramccoid - Darcy - will - lightspeed - ted - One ect.
*************************************************************
-thanks for everything

*************************************************************
to anyone who can do this simple task, it would be greatly appreciated. it will help me complete a plugin, which i will promtly post here!

i am trying to modify this:


If LogEntry = "" Then LogEntry = HalBrain.SearchPattern(OriginalSentence, "*LOG ENTRY *", 2)

so that LogEntry would contain everything i type after LOG ENTRY  
ex. log entry i am happy, for you. what is the time?
would contain everything i type after LOG ENTRY, where as of now it only gives LogEntry the value of "i am happy, for you."
(missing " what is the time?"
*as soon as you enter sentence ending punctuation, it stops appending to the variable LogEntry.

It must be able to append punctuation. (required for this plugin)
the above function is in PLUGINAREA1


I KNOW THIS IS AN EASY ANSWER, BUT I CAN"T FIND IT.[xx(]


Basically i am trying to make the variable infinite, so that it could contain punctuation, and however many sentences i want.


I appreciate any help in advance.....
-the dude

by the way....if anyone can use info gathering or simple (what i can do) script help, just ask.[:)]
« Last Edit: February 01, 2009, 01:22:42 pm by jasondude7116 »
 

onthecuttingedge2005

  • Guest
(solved) PLEASE SIMPLE QUICK SCRIPT HELP
« Reply #1 on: January 28, 2009, 06:02:37 am »
Hi Jason.

will this code I wrote due?

Code: [Select]
'Say something like; Read file 01/02/09
'the results will return; 01/02/09 from pattern search.
For i = 2 To 4
MyPattern = "*FILE */*/*"
PatArry = HalBrain.SearchPattern(OriginalSentence, MyPattern, i)
If i = 2 Then G1 = PatArry
If i = 3 Then G2 = PatArry
If i = 4 Then G3 = PatArry
  GetResponse = G1&"/"&G2&"/"& G3
Next

Jerry[8D]

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
(solved) PLEASE SIMPLE QUICK SCRIPT HELP
« Reply #2 on: January 28, 2009, 01:44:51 pm »
quote:
Originally posted by onthecuttingedge2005

Hi Jason.

will this code I wrote due?

Code: [Select]
'Say something like; Read file 01/02/09
'the results will return; 01/02/09 from pattern search.
For i = 2 To 4
MyPattern = "*FILE */*/*"
PatArry = HalBrain.SearchPattern(OriginalSentence, MyPattern, i)
If i = 2 Then G1 = PatArry
If i = 3 Then G2 = PatArry
If i = 4 Then G3 = PatArry
  GetResponse = G1&"/"&G2&"/"& G3
Next

Jerry[8D]




Please see first (modified) post for more info.

i have the date thing working now. here is what i am trying to make happen:

in PLUGINAREA1:

i have tried this-

If LogShow = "" Then LogShow = HalBrain.SearchPattern(OriginalSentence, "*LOG ENTRY *", 2)

if i say "log entry i am happy. there were many cars to drive today."
it gives LogShow the value "i am happy." nothing else, but i want it to give LogShow the value of "i am happy. there were many cars to drive today."

when i enter a "sentence-ending" type punctuation like "." or "!" or "?" it stops appending any more of the entry to LogShow

i want to be able to say "log entry" and then anything after that would be put to the LogShow value. including any normal punctuation.
i have found that it will append a very long string as long as i don't enter a "." or "!" ect. (sentence ending)

i would like to be able to give LogShow (or some variable) a value of however many sentences up to 20 (if possible) including punctuation and spaces.

This is the last thing i am trying to get past to finish a plugin, i have been pouring over vbscript info looking for an answer.

THANK YOU for the help with the date thing!
only 1 problem left[:)]
*?? is there a way to use Len??
THANKS AGAIN
-the dude

If you or anyone else wants to use anything i have done (i will get around to posting them on your site when they are tested enough)
then use them however you want....have fun!
« Last Edit: January 28, 2009, 08:59:55 pm by jasondude7116 »
 

onthecuttingedge2005

  • Guest
(solved) PLEASE SIMPLE QUICK SCRIPT HELP
« Reply #3 on: January 28, 2009, 11:17:29 pm »
Hi Jason.

for some reason the SearchPattern function is ending process at the ending of a punctuated sentence or statement.

this is a bug that Rob will have to fix, it may have been overlooked.

however, you can substitute that period in:
"log entry i am happy. there were many cars to drive today."

with

"log entry: i am happy, there were many cars to drive today."

the comma method works and I did place a semicolon in the trigger.

Code: [Select]
For i = 2 To 3
MyPattern = "*LOG ENTRY: *, *"
PatArry = HalBrain.SearchPattern(OriginalSentence, MyPattern, i)
If i = 2 Then G1 = PatArry
If i = 3 Then G2 = PatArry
GetResponse = G1&", "&G2
Next

Jerry[8D]

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
(solved) PLEASE SIMPLE QUICK SCRIPT HELP
« Reply #4 on: January 29, 2009, 04:54:20 pm »
geezaz chricht,
To me the letter 'i' represents the imaginary number in a math problem,, but 'i' = 1,, sometimes ( brain cramp )

Don't you guys use 'else' 'selectcase' 'if' statements?? do you dimm a variable as a string or integer??

I guess I should look at the plugin definitions and requirements, but it's like going backwards to a diminishing code.........
Today Is Yesterdays Future.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
(solved) PLEASE SIMPLE QUICK SCRIPT HELP
« Reply #5 on: January 29, 2009, 05:03:19 pm »
nevermind, L.S. just posted some code that looks correct. I can't help brain leaks[:o)]
Today Is Yesterdays Future.

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
(solved) PLEASE SIMPLE QUICK SCRIPT HELP
« Reply #6 on: February 01, 2009, 01:22:15 pm »
problem solved


thank you very much everyone.

i am learning as fast as possible.
thanks to your help!
-the dude