Jump to content

Window list


erggre
 Share

Recommended Posts

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 a

way to acheive my goal?

Thanks!

Link to comment
Share on other sites

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

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

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

  • Moderators

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

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

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

  • Moderators

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

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...