namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
hawin32.HyperACCESS hawin = new hawin32.HyperACCESS();
hawin32.IHAScript hascript = (hawin32.IHAScript)hawin.haInitialize("test");
hascript.haSizeHyperACCESS(3);
hascript.haOpenSession("session.HAW");
hascript.haConnectSession(0);
hascript.haWaitForConnection(1, 100000);
hascript.haWaitForPrompt("login: ", 300, 100000);
hascript.haTypeText(0, "username\r\n");
hascript.haWaitForPrompt("Password: ", 300, 100000);
hascript.haTypeText(0, "password\r\n");
hascript.haTerminate();
}
}
}
To execute this sample save the above code in your C# project. Compile and then run the program.