Embed C# Code in Your Outputs

Posts describing how to do almost anything with your Verbot®.

Moderator: Staff

Embed C# Code in Your Outputs

Postby Aaron » Fri Apr 29, 2005 12:03 am

As of version 4.0.6.0 you can use the csharp embedded command in your output. While this feature should only be used by experts, it gives you the power to do just about anything with your Verbot.

Simply write your C# within a <?csharp ... ?> tag, and it'll be executed when the rule fires.
Here's an example output that uses code:
<?csharp Console.WriteLine("Hello world!"); ?>

This will write the string "Hello world!" to the output itself.

Of course, you can use it to do more than just write strings of text. You could get the time and print that, or do some math, or pretty much anything else you can imagine.

I'll write some more examples as soon as I have some time.
Aaron
SupremeBot
SupremeBot
 
Posts: 1261
Joined: Thu Feb 26, 2004 11:13 pm

Return to How-To

Who is online

Users browsing this forum: No registered users and 1 guest