Message |
If you do a Note you can see what the function returned. Using your example:
Note (world.AddTriggerEx (
"tmp_mapper_"+world.GetUniqueNumber (),
"^[>]*you say:(.*)$",
"",
(17465+32768+512),//eEnabled+eTriggerRegularExpression+eIgnoreCase+eReplace+eTemporary,
3,//custom3,
1, //wildcard
"",
"testaa",
0,//1
2));
I see 30009 (the function testaa does not exist).
Now if I add the function, like this:
function testaa(_n,_l,_w){
world.note ("_n="+_n);
world.note ("_l="+_l);
world.note ("typeof(_w)="+typeof(_w));
world.note ("_w="+_w);
world.note ("_w[0]"+_w[0]);
world.note ("_w[1]="+_w[1]);
}
Note (world.AddTriggerEx (
"tmp_mapper_"+world.GetUniqueNumber (),
"^[>]*you say:(.*)$",
"",
(17465+32768+512),//eEnabled+eTriggerRegularExpression+eIgnoreCase+eReplace+eTemporary,
3,//custom3,
1, //wildcard
"",
"testaa",
0,//1
2));
I see 0 (success) and the trigger is added, like this:
<triggers>
<trigger
clipboard_arg="1"
custom_colour="4"
enabled="y"
expand_variables="y"
ignore_case="y"
keep_evaluating="y"
match="^[>]*you say:(.*)$"
name="tmp_mapper_265"
one_shot="y"
regexp="y"
script="testaa"
sequence="2"
temporary="y"
variable="tmp_mapper_265"
>
</trigger>
</triggers>
So, it does work. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|