$Winname = WinList ()
While 1
$uTitl = InputBox ("a","b")
If @error = 1 Then
Exit
Else
For $i = 1 To $Winname[0][0]
If $Winname[$i][0] <> "" And IsVisible($Winname[$i][1]) Then
WinActivate ($Winname[$i][0])
Sleep (1000)
$Titl = WinGetTitle ("[Active]")
If StringInStr ( $Titl, $uTitl) Then
MsgBox (0,"",$Titl)
ExitLoop
ElseIf $i = $Winname[0][0] Then
MsgBox (0,"","fail")
ExitLoop
EndIf
EndIf
Next
EndIf
WEnd
Func IsVisible($handle)
If BitAND(WinGetState($handle), 2) Then
Return 1
Else
Return 0
EndIf
EndFunc ;==>
不知道这能解决楼主的问题? |