Jump to content

AutoIt can't find the window


Recommended Posts

So, to start, I did a

WinWait("File Download","")

If Not WinActive("File Download","") Then WinActivate("File Download","")

WinWaitActive("File Download","")

Which didn't work. The script just times out, even though the window is clearly on screen. So, I added some more explicit text to the second part of the Win Wait/Active/ etc, and that didn't help. The kicker to this is that if you use the window tool, it sees the window being titled exactly "File Download".

Link to comment
Share on other sites

  • Moderators

So, to start, I did a

Which didn't work. The script just times out, even though the window is clearly on screen. So, I added some more explicit text to the second part of the Win Wait/Active/ etc, and that didn't help. The kicker to this is that if you use the window tool, it sees the window being titled exactly "File Download".

Try this:

Opt("WinTitleMatchMode", 2)

WinWait("File Download")
If Not WinActive("File Download") Then WinActivate("File Download")
WinWaitActive("File Download")

If that works, then it may have a space before the title or something of that nature.

Link to comment
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
 Share

  • Recently Browsing   0 members

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