PDA

View Full Version : Using Visual Studio to Automate Attachmate Extra! X-Treme 9.3



LeidyRiehle
11-16-2016, 12:28 PM
I want to use Visual Basic to automate Attachmate Extra! X-Treme.

I'm trying to log into Attachmate Extra! X-treme.
This is the code that I used for the previous attachmate version (Extra!)
but it's not working anymore for the new version (Extra! X-treme)

This is my code:

+++++++++++++
Option Strict Off
Option Explicit On

Module Attachmate

'Create a Global EXTRA System, Session and Screen object
Public Sys
Public Sess
Public Scr

Public Sub Attachmate_LogIn(ByRef UserName As String, ByRef Password As String, ByRef Account As String, ByRef WorkSpace As String)

'Step1: Declare variables and set global objects
Dim x As Boolean

'Set Attachmate objects
Dim Sys As Object
Dim Sess As Object
Dim Scr As Object

Sys = CreateObject("EXTRA.System")
Sess = Sys.Sessions.Open("c:\Automate_Attachmate\CSC3270.edp")
Scr = Sess.Screen

+++++++++++++++++++

I'm getting the message "Exception was unhandled" Cannot create ActiveX component.
and this line is highlighted Sys = CreateObject("EXTRA.System")

LeidyRiehle
11-20-2016, 07:21 PM
I think this error is because the Attachmate Extra X-treme was not installed on my computer locally.
So APIs cannot be accessed by client applications that are running on the desktop outside of the virtual environment.

I will install the mainframe locally and I will keep you updated!

: pray2: