Click or drag to resize

SimpleSetup

[This is preliminary documentation and is subject to change.]

Required introduction

Optional section title
C#
string testScript = @"
*This is a comment.
(0:0) when the script is started,
(5:0) print {Hello World} to the console.
";
Monkeyspeak.MonkeyspeakEngine engine = new Monkeyspeak.MonkeyspeakEngine();
Monkeyspeak.Page page = engine.LoadFromString(testScript);

page.SetTriggerHandler(new Monkeyspeak.Trigger(Monkeyspeak.TriggerCategory.Cause, 0), delegate { return true; });

page.SetTriggerHandler(new Monkeyspeak.Trigger(Monkeyspeak.TriggerCategory.Effect, 0), delegate(TriggerReader reader){
Console.WriteLine(reader.ReadString());
return true;
});
//Execute every block containing (0:0)
page.Execute(0);