Announcement

Collapse
No announcement yet.

List of events in groups

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    List of events in groups

    I'm trying to write a script that will put event names of a particular group into an array. There are no examples in the help file. Could anyone help me out?

    Thanks
    Don

    #2
    A bit quick and dirty but this should do it for the passed event group ID. There are probably slightly more elegant ways of doing this but it might be a start for you...arrEvNames will be the array that contains your event names.

    Code:
    Sub Main(ByVal Parm As Object)
    
        Dim returnArr() As strEventData = hs.Event_Info_Group(1051382564)
        Dim arrEvNames(0) As String
    
        For i As Integer = 0 To returnarr.getupperbound(0)
            arrEvNames(i) = returnArr(i).Event_Name
            ReDim Preserve arrEvNames(i + 1)
        Next
    
        ReDim Preserve arrEvNames(returnarr.getupperbound(0))
    
        For Each evName As String In arrEvNames
            hs.writelog("ArrayRead", evName)
        Next
    
    End Sub

    Comment


      #3
      As usual, extremely helpful.

      Thanks Adam!
      Don

      Comment


        #4
        No worries Don...it is a learning curve for me, I learn by looking at problems and trying to solve them.

        Comment

        Working...
        X