AlbertShenko
Programmer
I am starting to implement some scripting (in Excel/VBA) to interact with Attachmate EXTRA! X-Treme 9.3.
I can successfully create and open the session and I am able to send keys.
However, while the user name for the connection is stored, the password is not. I receive a dialog box prompting for the password and I have not figured out how to interact with this.
I am able to manually enter the password and resume my code; but how can I do this systematically?
Thanks for any guidance!
I can successfully create and open the session and I am able to send keys.
However, while the user name for the connection is stored, the password is not. I receive a dialog box prompting for the password and I have not figured out how to interact with this.
I am able to manually enter the password and resume my code; but how can I do this systematically?
Thanks for any guidance!
Code:
Public oSys As ExtraSystem
Public oSess As ExtraSession
Public oScreen As ExtraScreen
Sub ConnectToAttachmate()
Set oSys = CreateObject("Extra.System")
If oSys Is Nothing Then
MsgBox ("Could not create Extra.System...is E!PC installed on this machine?")
Exit Sub
End If
If oSys.Sessions.Count = 0 Then
Set oSess = oSys.Sessions.Open("C:\Users\ashenko\Desktop\apl\test.edp")
Else
Set oSess = oSys.Sessions(1)
End If
If (oSess Is Nothing) Then
MsgBox "Could not create the Sessions collection object. Stopping macro playback."
Stop
End If
If Not oSess.Visible Then oSess.Visible = True
End Sub
Sub Main()
Call ConnectToAttachmate
oSess.Activate
Set oScreen = oSess.Screen
oSess.Screen.SendKeys "<Enter>"
End Sub
[img]https://res.cloudinary.com/engineering-com/image/upload/v1542730309/tips/capture_zet9sb.jpg[/img]