hi,
there was a post from Mr Milson
which i tried to use but ran into problems.
what i'm trying to accomplish is to list all the active sessions and then be able to select the session that i want to activate.
i modified an Attachmate macro sample that i found. i have 2 DropListBox which are basically doing the same thing (i'm trying to learn the differences)
i'm not able to list all the sessions however i can list the active session.
is there a way to list the all the sessions?
if yes, then is there a way to select a session and activate that session?
i do have something similar that i use with excel (2 macros)but i'm looking for a solution using Extra.
thanks
zach
there was a post from Mr Milson
which i tried to use but ran into problems.
what i'm trying to accomplish is to list all the active sessions and then be able to select the session that i want to activate.
i modified an Attachmate macro sample that i found. i have 2 DropListBox which are basically doing the same thing (i'm trying to learn the differences)
i'm not able to list all the sessions however i can list the active session.
is there a way to list the all the sessions?
if yes, then is there a way to select a session and activate that session?
Code:
Sub Main
Dim Sys As Object
Set Sys = CreateObject("Extra.System")
Dim SessionNames() As String
SessionCount = Sys.Sessions.Count
For SessionCnt = 0 To Sys.Sessions.Count
ReDim Preserve SessionNames(SessionCnt)
SessionNames(Sessions) = Sys.Sessions.Item(SessionCnt).Name
Next
Begin Dialog dlgHouseSample 0, 1, 285, 193, "Open Sessions"
ButtonGroup .ButtonPressed
OkButton 225, 10, 50, 14
CancelButton 225, 30, 50, 14
PushButton 225, 50, 50, 14, "&Reset", .btnReset
Text 12, 5, 202, 9, "Open Sessions"
DropListBox 10, 15,95,55, SessionNames(),.ListBox1
Text 12, 75, 77, 8, "Open Sessions2"
DropListBox 12, 90, 81, 30, SessionNames(), .ListBox2
End Dialog
iDone = FALSE
While (iDone = FALSE)
Dim dMain as dlgHouseSample
nRet = Dialog(dMain)
Select Case nRet
Case -1 ' -1 is returned if the user chose OK
iDone = TRUE
iColor = dMain.ListBox2
Case 0 ' 0 is returned if the user chose Cancel
iDone = TRUE
Case 1 ' 1 is returned if the user chose Reset
dMain.ListBox2 = 0
Case Else
msgbox "Some undefined button pressed " + str(dMain.ButtonPressed)
End Select
Wend
End Sub
i do have something similar that i use with excel (2 macros)but i'm looking for a solution using Extra.
thanks
zach