quote:
Originally posted by thalesaraujo
quote:
Originally posted by Shanka
I don't think this script alone has the hability to check if it's the first time the expression is used (just to count amount of times it occurs in a sentence), it would be cool though. In flex that was possible making pseudo states and stuff...
Maybe you could try to recognize wich words people generally use to greet you, in wich parts of the sentences those words occur (^ and $) and try to make a almost universal regex. Like those examples you gave (hello", "holla", "good morning") separated by |.
Then for the numbers of the menu use a unusual expression like opt1, opt2, to reduce the probability of someone invoking that expression without wanting.
That´s sounds be a nice idea. But I am newbie in this scripts... Can you give me an example for a better understanding?
I thanks your help in advance.
----------------------------
You want to receive (4 example): hello, holla, oi, hi
BUT just phrases where this words are on the begining of the phrase. Then configure like this:
receive: ^hello|^holla|^oi|^hi
type: regExp
answer:
Hi, this is my menu!
the following commands are available
opt1 - send file xxx
opt2 - change nick
opt3 ....
who: contact (put both if you want to test it yourself)
-----------------------------------------
Now you may want to recognize the opt1, BUT only if it occurs alone in the line. Then...
receive: ^opt1$
type: regExp
answer:
/sendfile C:\Users\UserName\Documents\msnsend\xxx
who: contact (put both if you want to test it yourself)
---------------------------------------------
And so on
check wikipedia for regular expressions and examples on the net.