Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA, Attachmate Session connection

Status
Not open for further replies.

dz1rfj

IS-IT--Management
Dec 22, 2009
1
US


How can I specify a specific session to use with ,

Set System = CreateObject("Extra.System")

Set Sess = System.ActiveSession

Set MyScreen = Sess.Screen

I have lengthy scripts using this method, but I need several to use session B. I know how to do this with host.connect("B"), but then my other declaration are invalid as there is a type mismatch.

I have seen documentation on the Host functions, but not the System functions.

Any help would be most appriciated!!

 



Hi,

Use the Sessions collection like this maybe...
Code:
Dim oSess1, oSess2, i as integer

set oSess1 = System.ActiveSession

for i = 1 to System.Sessions.Count
  if System.Sessions(i).Name <> iSess1.Name then
     Set oSess2 = System.Sessions(i)
     Exit For
  end if
next


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top