Jump to content

Recommended Posts

Posted (edited)

I tried searching but couldn't find much help for this...

Basically what I'm trying to do is loop through the 11 Windows I have open on my system by title. Just getting this small part functioning is important as it will be part of a larger script. I'm just going crazy trying to figure out what I'm doing wrong. Am I using one of the functions wrong? Or what am I missing?

Any help would be greatly appreciatly!

While 1
    $WindowTitle = WinGetTitle( "" , "" )
    Select
        Case $WindowTitle = ( "File Download" )
            MsgBox ( 1, "Window Title - Found it", $WindowTitle)
            Exit
        Case Else
            MsgBox ( 1, "Window Title - Not it", $WindowTitle)
    EndSelect
WEnd
MsgBox ( 1, "Out of Loop", "Oh noes")
Exit
Edited by Webs
Posted

Thanks for the help James, your code worked perfectly! If I understand things correctly, my code needs an array that has all the titles in it, otherwise the msgbox will only display one title which will be the first one it comes across.

Posted

Thanks for the help James, your code worked perfectly! If I understand things correctly, my code needs an array that has all the titles in it, otherwise the msgbox will only display one title which will be the first one it comes across.

WinList puts all of the window titles (as of calling) into a two dimensional array. And the way the code I showed you, will also just display one message box because of the Exit command beneath it ;)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...