Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: How to exit the vbscript code at runtime

$
0
0
Hi again,

It sounds like you're letting the ScriptInterruptedException propagate out to a handler that displays the error message in a popup. To suppress that behavior, simply catch the exception:
engine.Script.Quit = new Action(() => ScriptEngine.Current.Interrupt());
try {
    engine.Execute(codeThatCallsQuit);
}
catch (ScriptInterruptedException) {
}
Cheers!

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images