I’m not entirely sure this is possible.
I have a legacy GUI application written in C#. Using AttachConsole(-1) (from kernel32.dll) I can add a console window if it is called from the command line. I’ve even been able to write a module to run through basic use cases and make it look as if it is a console application. I don’t show the window, and if I do it doesn’t update or work properly (because I didn’t use Application.Run)
However, another person in my team wants to do something similar where input arguments will set off a series of GUI actions (like buttonExample.PerformClick(), update text boxes, etc) to simulate a user. Is it possible to do this using C# entirely or will he have to use something like AutoIt?
We’re using VS2008/.NET Framework v3.5.
You can add string array args to your
static void Main()and pass them up to the GUI class to perform such actions.