Jump to content
Sign in to follow this  
SFWUser

Problem with WinExists function

Recommended Posts

SFWUser

I dont have a open window and dont have a hide window, but the message of my script always appears. My script:

If WinExists('Control') Then

MsgBox(0, "Test", "Control Window is open.")

Exit

EndIf

Share this post


Link to post
Share on other sites
SmOke_N

Run this to see what it is:

Local $aWL = WinList(), $aPL = ProcessList(), $sHold
For $iCC = 1 To UBound($aWL) -1
    If StringInStr($aWL[$iCC][0], 'Control') Then
        For $xCC = 1 To UBound($aPL) -1
            If WinGetProcess($aWL[$iCC][1]) = $aPL[$xCC][1] Then
                $sHold &= 'Process: ' & $aPL[$xCC][0] & @CRLF & 'Window: ' & $aWL[$iCC][0] & @CRLF & @CRLF
                ExitLoop
            EndIf
        Next
    EndIf
Next
$sHold = StringTrimRight($sHold, 4)
MsgBox(64, 'Info', $sHold)
Edit:

Just realized how slow it was... Sped it up a tad.

Edited by SmOke_N

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
SFWUser

tanks SmOke_N

I´ll use your code to test and identify the "secret" windows !

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  

×