Get window id from its name

  • Feature Description:
    I realized there is no easy way to grab the window id from its name.
    I know that I can do windowId = “Window_Extension_”+extensionId+"_"+windowName, but I guess it would be better to have an overwolf method directly return that

  • impact for my app: Low. It’s really a nice to have as previous method works, but it’s not “clean”

Thanks !

Hi, and thanks for the feedback.

We will discuss the matter internally, and we will update you here.
It might take up to a few days.

Thanks.

Just curious, what’s your use case?

@trebonius0, can you please clarify what exactly do you need?

Currently, the API is already supplying the window id and the window name.
For example, by calling overwolf.windows.get current window() you will get the id and the name in different fields.

I just want to check if another window is closed.
Doing a obtainDeclaredWindow would create it, which is not a desired behavior

Thanks

In this case you should use the getWindowsStates() method. overwolf.windows API · Overwolf

We can add the app window ids to the result, but I think that it’s more convenient to work with the windows names instead.

Let me know what you think @trebonius0

Hmm yeah indeed that works, thanks !

1 Like