Jump to content

Winwait problem


The Man
 Share

Recommended Posts

I have a problem:

I use in my script the WinWait() command and it's not functioning with Mozilla FireFox but it works with Microsoft Internet Explorer ...

Whats wrong with my FireFox?

[font="Arial"] If you can't beat them, arrange to have them beaten ...[/font]

Link to comment
Share on other sites

  • Moderators

I have a problem:

I use in my script the WinWait() command and it's not functioning with Mozilla FireFox but it works with Microsoft Internet Explorer ...

Whats wrong with my FireFox?

Your Opt("WinTitleMatchMode", '') is wrong or your title is wrong. If this doesn't work, then as LxP said... this is a moot question without any code.

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.

Link to comment
Share on other sites

I believe that this line causes the problem for Firefox:

WinWait("Larkinor" , "Done")

If you inspect a Firefox window using AutoIt Window Info, you will find that Firefox windows do not display any text in a form that AutoIt can see -- hence your script will wait forever at this line. Removing the red portion will prevent this, however your script will not wait until the page finishes loading.

You will notice that the Stop button greys out when the page is ready. You could test for this using PixelGetColor().

Link to comment
Share on other sites

The PixelGetColor() it's a good idea, only i dont know how to manage to pause the script until that pixel changes its color.Any suggestions?

Edited by The Man

[font="Arial"] If you can't beat them, arrange to have them beaten ...[/font]

Link to comment
Share on other sites

Something like this will do it:

Do
    Sleep(50)
Until PixelGetColor(190, 66) <> 0xF00000

This works on my system but I've moved my toolbar icons since installing, so you'll need to adjust the values on the Until line.

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...