window.name or something similar

How does one get the name of the window programmatically? I don’t see anything in the docs nor in MBS plugins. I search the forums and found nothing. Maybe my search-fu is weak tonight.

thanks!

Scott - do either of these help you at all (probably not), but at least I tried :slight_smile:

Window.Title which will return the text in the TitleBar.

Or:
Window Handle

A window does not have a name, per se. The Name property is the name of the class. Your window is an instance of that class and is not named. You can have several instances of the window active at the same time.

You can use IsA to test for the window class.

if window(x) IsA Window1 then ...

[quote=166248:@scott boss]How does one get the name of the window programmatically? I don’t see anything in the docs nor in MBS plugins. I search the forums and found nothing. Maybe my search-fu is weak tonight.

thanks![/quote]

Scott this works well for me to find a window by a specific name.
HTH
Mike

Function Is_eAPI_AutoDetectWinOpen () as Boolean
Dim n as Integer = WindowCount
  for i as integer = 0 to n-1
    if Window(i) isa AristaAuto_eAPI_TrackerWindow then // Your Window Name
      Return True // Once you have your window then the other properties are available to you
      Exit
    Else
    end if
  next

Put this in a module and then use for example Window(0).name to get the class name

[code]Function Name(extends w as window) As String

dim t as Introspection.TypeInfo = Introspection.GetType(w)

return t.name

End Function[/code]

I think Massimo is right.

But I have a feedback case 18478 where I asked for name property 3 years ago.