public void RunScript()
{
if (!srm.HasStdOutputListener(this))
{
srm.AddStdOutputListener(this);
}
try
{
CompiledScript cs = srm.Compile(editor.Text);
object v = srm.RunCompiledScript(cs);
if (ScriptExecuted != null)
{
ScriptExecuted(this, null);
}
timer.Enabled = true;
//LogValue(v);
}
catch (Exception ex)
{
Log("error: " + ex.Message);
}
}