Sign in to follow this  
Followers 0
erggre

Window list

15 posts in this topic

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!

Share this post


Link to post
Share on other sites



Combine WinGetClassList with WinList in a loop for your results.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

What is your goal?

The handles will uniquely identify the windows if that's what you're woundering

Edited by evilertoaster

Share this post


Link to post
Share on other sites

What is your goal?

The handles will uniquely identify the windows if that's what you're woundering

My goal is to only keep window's matching a specific class name.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

WinList () should work if you define it to look for a certian class name-

WinList ([CLASS:classname])
Edited by evilertoaster

Share this post


Link to post
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

Share this post


Link to post
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!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

How do you have windows with same name and different classes?

Share this post


Link to post
Share on other sites

How do you have windows with same name and different classes?

Sometimes child windows are like that.

[center]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.[/center]

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

I didn't see that syntax in the help file. I must have missed something or my doc

is 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)

post-5131-1193172139_thumb.jpg

Share this post


Link to post
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!"

Share this post


Link to post
Share on other sites

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.

[center]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.[/center]

Share this post


Link to post
Share on other sites

Not any longer with the new [CLASS:ClassName] implementation.

Thanks everybody, it's working exactly the way I wanted to with ([CLASS:ClassName] )!

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  
Followers 0