Reputation: 721
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?
Upvotes: 0
Views: 1522
Reputation:
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.
Upvotes: 1
Reputation: 941267
You'd have to implement your own scripting host. Don't know much about it, ought to be challenging in C#. Start reading here.
Upvotes: 1