Jump to content

Experimenting.. need advice


Recommended Posts

Hi,

I'm experimenting with AutoItSetOption.

In this particular instance, PixelCoordMode.

Learning a bunch so far, though I've run into an issue in my testing.

Issue:

When PixelCoordMode is used, it appears that the PixelSearch coordinates are not retained.

Therefor, I'm unable to use them in a function. *example code below.*

Spoiler

 

Opt("PixelCoordMode", 0) ;Running in PixelCoordMode

$FindRedDot = PixelSearch( 4, 33, 1279, 744, 0xCCA700)

While 1

If IsArray ($FindRedDot) = 1 Then
        Call (ClickRedDot)
EndIf

WEnd

Func ClickRedDot()
    MouseClick("left",$FindRedDot[0],$FindRedDot[1], 2, 1) <--------- Doesn't click the correct coords, unless I remove PixelCoordMode, then it does.
EndFunc

 

Any insight on how this works?

Can anyone point me in the direction of how to fix this?

P.S I attempted this example with MsgBox, to see if it was retaining any coordinates at all - and no it was not.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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