Hypertrophy Posted January 23, 2010 Posted January 23, 2010 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.
Akshay07 Posted January 23, 2010 Posted January 23, 2010 What about using AutoItSetOption with WinTextMatchMode or WinTitleMatchMode?
Sobiech Posted January 24, 2010 Posted January 24, 2010 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
Hypertrophy Posted January 25, 2010 Author Posted January 25, 2010 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.
somdcomputerguy Posted January 25, 2010 Posted January 25, 2010 ..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.
somdcomputerguy Posted January 25, 2010 Posted January 25, 2010 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.
somdcomputerguy Posted January 25, 2010 Posted January 25, 2010 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.
Hypertrophy Posted January 25, 2010 Author Posted January 25, 2010 thank you very much for the good example. your time helping me is appreciated. God Bless you. Amen.
somdcomputerguy Posted January 25, 2010 Posted January 25, 2010 Hey glad to help - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
Hypertrophy Posted January 30, 2010 Author Posted January 30, 2010 (edited) 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 January 30, 2010 by Hypertrophy
picaxe Posted January 30, 2010 Posted January 30, 2010 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)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now