var matches = new Array(); matches.push(script.match("Xibar", test1(), null)); matches.push(script.match("spells are favored", test2(), null)); script.matchwait(matches); function test1() { script.echo("Matched Xibar!"); } function test2() { script.echo("Matched spells are favored!"); } script.exit(); //Note not actually concentrating. //Only output... //[mwtest]: Matched Xibar!