Sign in to follow this  
Followers 0
NELyon

Building string of visible windows

3 posts in this topic

I'm making a small script to allow me to control the transparency of windows with a GUI.

This is the isolated portion of code that I am having trouble with.

Global $sTitles
$azTitles = WinList()
For $i = 1 To $azTitles[0][0]
    If WinGetState($azTitles[$i][0]) = 2 Then
        $sTitles &= $azTitles[$i][0] & "|"
    EndIf
Next

This is meant to build a string of visible windows for use in a Combo box. It works fine if I remove the WinGetState() call, but then I get those pesky hidden windows that you couldn't make transparent anyway.

I'm sure this is just something simple that I'm missing. Thanks for the help.

Share this post


Link to post
Share on other sites



The values returned by WinGetState is or'ed so you need to use BitAND().

If BitAND(WinGetState("AutoIt Help"),2)=2 Then
;...

muttley


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

Ha. Thanks.

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