Jump to content

how to display certain windows


Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...