Jump to content

Can't use pixel coordinates in FF


RealisT
 Share

Recommended Posts

Seeking a way to detect a Firefox page change, I've decided to find a specific pixel's color and then have the AutoIt code wait for this color to change. (Reasons for this listed below)

The problem is that, in FF, the coordinates of the pixelsearch command are on a different part of the page than the same coordinates used by pixelgetcolor, no matter what settings I use.

(Sample code below)

Now before some of you start a reply about me using AutoItSetOption(), let me mention that I've tried all combinations of pixelcoordmode, as well as all combinations of pixelcoordmode along with mousecoordmode. No combination works! No matter what I do, pixelgetcolor is not looking at the same pixel as pixelsearch, even if I directly feed the coords from one to the other.

If no settings work, then what do I do to use pixel coordinates effectively in FF?

BTW, this issue does not exist in IE9.

(Sample Code):

----------------------------------------------------------

$orangePointPos = PixelSearch(600, 0, 1200, 500, 0xF3B34C, 30) ; Finds coord within an orange button

$confirmColor = PixelGetColor($orangePointPos[0], $orangePointPos[1]) ; Retrieves the actual color of the pixel

; Wait for color change (i.e., for button to disappear, i.e., for page change)

Do

Sleep(100)

$checkColor = PixelGetColor($orangePointPos[0], $orangePointPos[1]) ;

Until $checkColor <> $confirmColor

------------------------------------------------------------

These are all valid values, insofar as the searches are finding something and returning arrays, etc.

In order to see the coords AutoIt is using, I inserted the following command:

mousemove($orangePointPos[0], $orangePointPos[1])

This never takes me to the orange pixel detected, no matter what setting I use!

I am open to other suggestions about detecting the FF page-change, but I still want to get the pixel coord issue solved.

Thanks

--Me

(Reasons for pixel color change detection as FF page-change detection:

For this specific use, window title detection is irrelevant because the title does not change names across the pages I'm browsing. Also, AutoIt does not appear to detect any text in a FireFox window either. Plus FF does not have a status bar or even the option to have a status bar. So I am going with observing the current page for changes. FYI).

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