Jump to content
Sign in to follow this  
Hypertrophy

how to display certain windows

Recommended Posts

Hypertrophy

how would i display all windows that end in "Logging for joe99" in and array. I don't know how to isolate only the windows that end in that phrase.

Share this post


Link to post
Share on other sites
Akshay07

What about using AutoItSetOption with WinTextMatchMode or WinTitleMatchMode?

Share this post


Link to post
Share on other sites
Sobiech

I am sure that "Window Titles and Text (Advanced)" in help file will help you.

Use the "CLASS" for your problem


This world is crazy

Share this post


Link to post
Share on other sites
Hypertrophy

Class won't work because the application, every window has the same exact class. And I can't change WinTitleMatchMode because it'll mess up other parts of my code where I need the whole window title.

Share this post


Link to post
Share on other sites
somdcomputerguy

..I can't change WinTitleMatchMode because it'll mess up other parts of my code where I need the whole window title.

Change it back when you're done

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
Hypertrophy

How do you do that?

Share this post


Link to post
Share on other sites
somdcomputerguy

Just set it to what is needed before it is needed, once, twice, three times..


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
somdcomputerguy

For example, this code returns this

Opt("WinTitleMatchMode", 2)
ConsoleWrite("Full title read was: " & WinGetTitle("Mozilla", "") & @LF)
Opt("WinTitleMatchMode", 1)
ConsoleWrite("Full title read was: " & WinGetTitle("Mozilla", "") & @LF)

Full title read was: how to display certain windows - AutoIt Forums - Mozilla Turboshrimp
Full title read was: 0

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
Hypertrophy

thank you very much for the good example. your time helping me is appreciated. God Bless you. Amen.

Share this post


Link to post
Share on other sites
somdcomputerguy

Hey glad to help


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
Hypertrophy

been working on it and i can't figure out how to structure the code so it shows ALL windows that end in "Logging for joe99". its only showing the window that was last active

$tbllist = WinList("[CLASS:SpecialClass]")
        For $n = 1 To $tbllist[0][0]
            If $tbllist[$n][0] <> "" AND IsVisible($tbllist[$n][1]) Then
                    Opt("WinTitleMatchMode", 2)     ; set window title matching mode to match any substring
                    For $m = 1 To $tbllist[0][0]
                        $ttitle = WinGetTitle("Logged for joe99 ")
                        msgbox(0,"", $ttitle)   ; its only displaying last active window?
                    Next

                EndIf
            EndIf
        Next
Edited by Hypertrophy

Share this post


Link to post
Share on other sites
picaxe

This works for me (with different $sEndWith)

$sEndWith = "Logging for joe99" ; get all visible windows ending with
$aVar = WinList()
$sWin = ""
For $i = 1 to $aVar[0][0]
    If StringRegExp($aVar[$i][0], '(?i).*\Q' & $sEndWith & '\E ) And BitAnd(WinGetState($aVar[$i][1]), 2) Then
        $sWin &= $aVar[$i][0] & "," & $aVar[$i][1] & @CRLF
    EndIf
Next
MsgBox(262144, "Ending with: " & $sEndWith, $sWin)

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  

×