Jump to content
Sign in to follow this  
v1rtu0s1ty

Don't know if there is a func like this

Recommended Posts

v1rtu0s1ty

I'm not sure if there is a function that's already doing this. It is similar to WinGetHandle's approach.

I executed a vb program that will enumerate window properties such as handle, title and classnames of all window that exists.

Here is my situation. I have windows that have the same classnames, but they don't show up at the same time. I was hoping that if there was a function wherein we can specify the classnameNN and it would spit out the title.

$WindowTitle = WinGetTitlebyClassNameNN("classname=somewin002")
Msgbox(0, "", "Title found is " & $WindowTitle)

With that, I can do this

While 1
    $WindowTitle = WinGetTitlebyClassNameNN("classname=somewin002")

    if $WindowTitle = "WARNING - ODBC issues" Then
         ;some codes here
    endif
    if $WindowTitle = "WARNING - SQL down" Then
         ;some codes here
    endif
    if $WindowTitle = "WARNING - Logspace full" Then
         ;some codes here
    endif

Wend

This is really good for some windows that dynamically updates the title.

Thanks guys,

Neil

Share this post


Link to post
Share on other sites
Valik

I was hoping that if there was a function wherein we can specify the classnameNN and it would spit out the title.

Its called (un-imaginatively enough), WinGetTitle().

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.