هل تعلم بوت Libre كما يوفر مجانا استضافت المنتديات على موقع الويب الخاص بك أو الهاتف المحمول التطبيق ؟
Self, AIML, and scripting : script logic

RE: script logic

قبل admin نشر Sep 9 2016, 14:52

The issue is your 'case "*"' is only going to accept the exact text "*"

"*" is nothing special, and not a pattern.

The "case" operator takes either a string/text, or a "variable" object.

So you can change it to,

case country goto...

This will assign the "country" variable to the next word, and you can use the variable in your function.

You can also use patterns that use *, but a pattern compares the entire sentence.

i.e.
pattern "translate the postal code * in *" template...

For a pattern the "*" values become the "star" variable.
For multiple stars, star becomes an array, i.e. star[0] and star[1].


معرف: 13960654
نشر: Sep 9 2016, 14:52
الردود: 0
الآراء: 1774, اليوم: 2, الأسبوع: 5, الشهر: 14
0 0 0.0/5