Connected Property Example

This example identifies and displays the open sessions that are currently connected.

Sub Main()

 Dim Sys As Object, Sess As Object

 Set Sys = CreateObject("EXTRA.System")

' Assumes one or more open sessions

 SessionCount = Sys.Sessions.Count

 For i = 1 to SessionCount

  If Sys.Sessions.Item(i).Connected Then

  Connected$ = Connected$ + Sys.Sessions.Item(i).Name + " "

  End If

 Next

 MsgBox "The following sessions are connected: " + Connected$

End Sub