I am using VB6 to connect to a session of Extra and transfer a file from a mainframe account. I have to use a password to login to the account using sendkeys which works fine when I f8(step) through the code, but when I 'run' the code the sendkeys doesnt work and I dont get logged into the mainframe account. Here is the code I am using. Any help would be a God send.
Public Sub connect_Extra()
Dim Sessions As ExtraSessions
Dim session As ExtraSession
Dim strPath As String
Dim extraConn As ExtraConnectivity
Dim sysSession As New ExtraSystem
Dim screenHost As ExtraScreen
Dim waitobj As Object
Dim waitforKeys$
Dim wait1 As Object
Dim strPswrd As String
Dim strAccount As String
Set sysSession = CreateObject("Extra.system")
Set Sessions = sysSession.Sessions
Set session = Sessions.Open("C:\Program Files\Attachmate\E!E2K\Sessions\V037s1.edp")
Set screenHost = session.Screen
session.WindowState = xMAXIMIZED
screenHost.WaitHostQuiet (consSettleTime)
'login to mainframe
screenHost.SendKeys ("fuapms<Tab>end08use")
screenHost.SendKeys ("<Enter>")
session.FileTransferScheme = "C:\Program Files\Attachmate\E!2k\schemes\enu\Text Default.eis"
session.FileTransferHostOS = 0
session.ReceiveFile "\\file015\cso_grp\imc\policy services data\filenet data\daily image data\imgd0723.txt", "imgdacnt f040723 a"
screenHost.WaitHostQuiet (50000
Public Sub connect_Extra()
Dim Sessions As ExtraSessions
Dim session As ExtraSession
Dim strPath As String
Dim extraConn As ExtraConnectivity
Dim sysSession As New ExtraSystem
Dim screenHost As ExtraScreen
Dim waitobj As Object
Dim waitforKeys$
Dim wait1 As Object
Dim strPswrd As String
Dim strAccount As String
Set sysSession = CreateObject("Extra.system")
Set Sessions = sysSession.Sessions
Set session = Sessions.Open("C:\Program Files\Attachmate\E!E2K\Sessions\V037s1.edp")
Set screenHost = session.Screen
session.WindowState = xMAXIMIZED
screenHost.WaitHostQuiet (consSettleTime)
'login to mainframe
screenHost.SendKeys ("fuapms<Tab>end08use")
screenHost.SendKeys ("<Enter>")
session.FileTransferScheme = "C:\Program Files\Attachmate\E!2k\schemes\enu\Text Default.eis"
session.FileTransferHostOS = 0
session.ReceiveFile "\\file015\cso_grp\imc\policy services data\filenet data\daily image data\imgd0723.txt", "imgdacnt f040723 a"
screenHost.WaitHostQuiet (50000