tags:

views:

47

answers:

2

Hello,

I want to write a program is C# that will allow me to execute a vbscript step by step like I would do in a debugger. I know I can run vbscript by creating a new process class form System.Diagnostics but I was wondering if that will allow me to execute one line of vbs code at a time.

Background:We have this UI automation framework that generates vbscript based on the tests written in an excel file. This vbscript in turn make calls to a dll that performs actions on the application.

We want to get away from excel and put this automation framework in silverlight.

So what I need is an ability for the user to run though step by step through that vb script like a debugger on an interpreter would.

Any ideas?

+1  A: 

You'd have to implement your own scripting host. Don't know much about it, ought to be challenging in C#. Start reading here.

Hans Passant
This sounds promising. Thanks
+1  A: 

You might try the MS ScriptControl.

You should be able to execute your code line by line, however maintaining the state might be a challenge depending on how many variables are being used by the VBScript or if you are just making one distinct call per line.

thanks. I'll try this. yes maintaining state will be required as there are lots of variables!