Module Module1

Sub Main()
Dim haWin32 = CreateObject("HAWin32") ' Create the HyperACCESS object.
Dim haScript = haWin32.haInitialize("vbExample") ' Create the script object.
Dim cr = Chr(13)

haScript.haSizeHyperACCESS(3)
haScript.haOpenSession("session.haw")
haScript.haConnectSession(0)
haScript.haWaitForConnection(1, 100000)

haScript.haWaitForPrompt("login: ", 300, 100000)
haScript.haTypeText(0, "login" & cr)
haScript.haWaitForPrompt("Password: ", 300, 100000)
haScript.haTypeText(0, "password" & cr)

haScript.haTerminate()
End Sub

End Module

To execute this sample save the above code in your visual basic project. Compile and then run the program.

Return to sample script index