I'm having some trouble with regex on an addtrigger in JScript. I've done this successfully in VBScript. I've also added the trigger successfully without the regex, but once the regex is added EVERY single line makes it trigger.
I don't understand what I'm doing wrong and why it's only in JScript. Mushclient v4.84
world.addtrigger("detect_exits", "[You can move: .*]", "", 33, 14, 0, "", "ExampleTrigger");
}
function ExampleTrigger (thename, theoutput, wildcardsVB)
{
wildcards = VBArray(wildcardsVB).toArray();
world.note ("Trigger " + thename + " fired.");
world.note ("Matching line was: " + theoutput);
for (i = 0; i < 10; i++)
if (wildcards != "")
world.note ("Wildcard " + i + " = " + wildcards );
}
Let me know if you can help in any way,
Thanks
I don't understand what I'm doing wrong and why it's only in JScript. Mushclient v4.84
world.addtrigger("detect_exits", "[You can move: .*]", "", 33, 14, 0, "", "ExampleTrigger");
}
function ExampleTrigger (thename, theoutput, wildcardsVB)
{
wildcards = VBArray(wildcardsVB).toArray();
world.note ("Trigger " + thename + " fired.");
world.note ("Matching line was: " + theoutput);
for (i = 0; i < 10; i++)
if (wildcards != "")
world.note ("Wildcard " + i + " = " + wildcards );
}
Let me know if you can help in any way,
Thanks