Jump to content
Sign in to follow this  
Champak

WinActive and WinExists

Recommended Posts

Champak

I'm using winactive() I'm using it both with:

"If winactive(title, text) then" and "If winactive(title, text) = 1 then"

Problem is it seems to be detecting the hidden text when it shouldn't be. The Opt(WinDetectHiddenText) is not set, and as far as I'm aware that means it is on the default mode which is to not see hidden text. So why is it seeing the hidden text? Is there another way?

EDIT: This is also happening with winexists. Does this "just happen" with some programs?

Edited by Champak

Share this post


Link to post
Share on other sites
SmOke_N

I'm using winactive() I'm using it both with:

"If winactive(title, text) then" and "If winactive(title, text) = 1 then"

Problem is it seems to be detecting hidden text. The Opt(WinDetectHiddenText) is not set, and as far as I'm aware that means it is on the default mode which is to not see hidden text. So why is it seeing the hidden text? Is there another way?

Did you verify it was seeing hidden text with WinGetText()? Are you using all the "normal" text? If not, you may want to look at the other Opt() "WinTextMatchMode" and use quick mode (2).

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.

Share this post


Link to post
Share on other sites
herewasplato

... Does this "just happen" with some programs?

Not that I've seen. Could you post the info that the "AutoIt Window Info" tool "sees" for that window of interest?

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
Champak

1/ No, I only verified the hidden text by using the info tool and looking at visible/hidden text tab.

2/ What do you mean by "normal" text?

3/ I'll check the winGetText, and then check the other title match mode.

Thanks.

Share this post


Link to post
Share on other sites
SmOke_N

1/ No, I only verified the hidden text by using the info tool and looking at visible/hidden text tab.

2/ What do you mean by "normal" text?

3/ I'll check the winGetText, and then check the other title match mode.

Thanks.

The info tool is not necessarily what your script will see. It's what Jon wrote for the info tool to display. It being a separate application, I can't imagine why you thought your autoit script would see the same thing.

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.

Share this post


Link to post
Share on other sites
Champak

Well I assumed that it was written in autoit, and I don't think it is a stretch of the imagination or reach to conclude if both applications are written with the same language, that they would both see the same information on the computer.

Anyway, it was my carelessness, I've been working on this so long I forgot some things I initially put in like detecting hidden text ;) . So something may fail down the line that I'm going to have to backtrack to this moment because I don't remember why I put it in or if I still need it. Oh well, only time will tell.

Thanks both of you anyway.

Edited by Champak

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  

×