erggre Posted October 23, 2007 Share Posted October 23, 2007 Hi, My first post here.Let's say I have 10 windows with the same title and text.The only difference between them is the class.There's a function named WinList returning all windows with "title" and "text"but this will obviously return all ten windows.I like the way WinList returns the results (count, handles,...), so is there away to acheive my goal?Thanks! Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 23, 2007 Share Posted October 23, 2007 Combine WinGetClassList with WinList in a loop for your results. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
evilertoaster Posted October 23, 2007 Share Posted October 23, 2007 (edited) What is your goal? The handles will uniquely identify the windows if that's what you're woundering Edited October 23, 2007 by evilertoaster Link to comment Share on other sites More sharing options...
erggre Posted October 23, 2007 Author Share Posted October 23, 2007 What is your goal?The handles will uniquely identify the windows if that's what you're wounderingMy goal is to only keep window's matching a specific class name. Link to comment Share on other sites More sharing options...
evilertoaster Posted October 23, 2007 Share Posted October 23, 2007 (edited) WinList () should work if you define it to look for a certian class name- WinList ([CLASS:classname]) Edited October 23, 2007 by evilertoaster Link to comment Share on other sites More sharing options...
erggre Posted October 23, 2007 Author Share Posted October 23, 2007 WinList () should work if you define it to look for a certian class name- WinList ([CLASS:classname]) Nice! I didn't see that syntax in the help file. I must have missed something or my doc is not up to date. (WinList ( ["title" [, "text"]] ) ) I'll try that tonight. Thank you M. evilertoaster Link to comment Share on other sites More sharing options...
erggre Posted October 23, 2007 Author Share Posted October 23, 2007 Combine WinGetClassList with WinList in a loop for your results. If this is not working "WinList ([CLASS:classname])", I'll for sure give that a try even though I don't see the obvious way of combining those two function. Thanks! Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 23, 2007 Share Posted October 23, 2007 Ok, after further study, my orginal post is meaningless. But ... also after further study ... the OP's original post is meaningless from a programmitcal point of view. If you have 10 identical apples, but the only difference is the the length of the stem, how do you determine which one to take a bite out of first? You don't. You just pick one. Unless one's a granny smith that's been painted as a red delicious. I could see where it would be a problem, but the situation would be so astronomically rare that the OP's first post remains meaningless. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
weaponx Posted October 23, 2007 Share Posted October 23, 2007 How do you have windows with same name and different classes? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 23, 2007 Moderators Share Posted October 23, 2007 How do you have windows with same name and different classes?Sometimes child windows are like that. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
erggre Posted October 23, 2007 Author Share Posted October 23, 2007 How do you have windows with same name and different classes?My goal was to retreive a list of windows based on the class criteria.The title can't be use because everytime I have a new window the title is different.(my first post was unclear, I said that the title was the same for two different class type window)The text can't be use because there is none. Link to comment Share on other sites More sharing options...
evilertoaster Posted October 23, 2007 Share Posted October 23, 2007 I didn't see that syntax in the help file. I must have missed something or my docis not up to date.Keep in mind then that you need to use advanced windows titles for this to work- Opt("WinTitleMatchMode",4)In the manual there's a section on it (see attached) Link to comment Share on other sites More sharing options...
GEOSoft Posted October 23, 2007 Share Posted October 23, 2007 That help file page is also here. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 23, 2007 Moderators Share Posted October 23, 2007 Keep in mind then that you need to use advanced windows titles for this to work- Opt("WinTitleMatchMode",4) In the manual there's a section on it (see attached)Not any longer with the new [CLASS:ClassName] implementation. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
erggre Posted October 24, 2007 Author Share Posted October 24, 2007 Not any longer with the new [CLASS:ClassName] implementation. Thanks everybody, it's working exactly the way I wanted to with ([CLASS:ClassName] )! Link to comment Share on other sites More sharing options...
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