Interacting with Attachmate dialog box at login
Interacting with Attachmate dialog box at login
(OP)
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 --> VBA
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![]()
RE: Interacting with Attachmate dialog box at login
What application are you coding your VBA in?
Skip,
Just traded in my OLD subtlety...
for a NUance!
RE: Interacting with Attachmate dialog box at login
RE: Interacting with Attachmate dialog box at login
Just use the control that you’d use in any other circumstance. I’ve use and ActiveX or Forms control, from your Developer menu. I’ve run all my screen scrapers from Excel, since my driver data was in Excel and my results went to Excel for my users and I much prefer to drive a Caddy than a Yugo.
BTW, born and raised in the Keystone State.
Skip,
Just traded in my OLD subtlety...
for a NUance!
RE: Interacting with Attachmate dialog box at login
Once I get passed that prompt (manually), I can interact with that session though Excel; but I am unable to figure how to send my password to that popup dialog box (in the screenshot) that Attachmate is bringing up. I am not sure how to set the focus on that rather than the main window.
And sadly, Fall foliage is abandoning us here in PA as the trees are pretty much baron. It was pretty for a few weeks.
RE: Interacting with Attachmate dialog box at login
Never had a pop-up. Always had terminal interface to IBM mainframes where the emulator mimicked a green screen dumb terminal with login fields on screen.
Is there some way to start your session interface with a screen login rather than a control object? You call a startup program puts the control up. There may be another way to call up a screen form.
Not knowing your system, but I recall a /for I believe.
Skip,
Just traded in my OLD subtlety...
for a NUance!
RE: Interacting with Attachmate dialog box at login
Using the Watch Window in your VBA Editor, you may be able to find the control and discover the properties.
Skip,
Just traded in my OLD subtlety...
for a NUance!
RE: Interacting with Attachmate dialog box at login
For the benefit of others who come across the same problem:
The popup dialog of EXTRA! does not accept SendKeys sent to the ExtraSession object (in my case, called oSess).
However, you can use AppActivate in VBA by referencing the EXTRA! application by name and SendKeys to that to clear the pop-up prompt.
Then from there, you can SendKeys and otherwise interact with the session screen directly (in my case, oSess.Screen.SendKeys) as expected.
RE: Interacting with Attachmate dialog box at login
Skip,
Just traded in my OLD subtlety...
for a NUance!