Sign in to follow this  
Followers 0
The Man

Winwait problem

8 posts in this topic

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]

Share this post


Link to post
Share on other sites



Let's take a look at your code please! I have no problem using WinWait() with Firefox here.

Share this post


Link to post
Share on other sites

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.


[center]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.[/center]

Share this post


Link to post
Share on other sites

Okay then heres the code:

source.au3


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

Share this post


Link to post
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().

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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]

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Thanks for the help, it worked !!! :P


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

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  
Followers 0