Jump to content

Pixelsearch function


Recommended Posts

Ok i searched on forum and i still dont understand how to add coordinates so that it will search inside that "box" for a specific colour.

Lets say i have coordinates like this:

(414,322) -top left (543,25) -top right

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

|-------------------------------|

|-------------------------------|

|-------------------------------|

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

(478,40) -buttom left (550,39) - buttom right

This is a box with (x,y) coordinates.

So which ones should i put inside that pixelsearch function?

PixelSearch( 0, 0, 0,0 , 0xFF0000 )

thx for help

Edited by amakrkr
Link to comment
Share on other sites

Ok i searched on forum and i still dont understand how to add coordinates so that it will search inside that "box" for a specific colour.

Lets say i have coordinates like this:

(414,322) -top left (543,25) -top right

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

|-------------------------------|

|-------------------------------|

|-------------------------------|

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

(478,40) -buttom left (550,39) - buttom right

This is a box with (x,y) coordinates.

So which ones should i put inside that pixelsearch function?

PixelSearch( 0, 0, 0,0 , 0xFF0000 )

thx for help

Your coordinates don't make sense to me. If the top left is 414,322 then the bottom left x coordinate should be 414 and the top right y coordinate should be 322 shouldn't it?

I think we need to sort that out before the next step.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

(414,322) -top left (543,25) -top right

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

|-------------------------------|

|-------------------------------|

|-------------------------------|

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

(478,40) -buttom left (550,39) - buttom right

you basically defining a rectangle and specitfying the (TOP,LEFT) and (BOTTOM,RIGHT)

logically, when something is at the top, and on the same plane, it should remain the same number.....?

so 414,322 = xplane(along the horizontal axis) is 414 and the yplane( along the verticle axis) is 322. which will define your TOP & LEFT as 414,322

and the bottom right as (550,39) x axis being 550 and y axis as 39... hope this has helped.

but you need to change your (TOP,LEFT) and (BOTTOM,RIGHT) coodinates to suit.

Edited by Aceguy
Link to comment
Share on other sites

Your coordinates don't make sense to me. If the top left is 414,322 then the bottom left x coordinate should be 414 and the top right y coordinate should be 322 shouldn't it?

I think we need to sort that out before the next step.

yeah i dint put those coordinates in a hurry... this is the correct form i think..

(414,322) (543,322)

(414,40) (550,40)

Link to comment
Share on other sites

you basically defining a rectangle and specitfying the (TOP,LEFT) and (BOTTOM,RIGHT)

logically, when something is at the top, and on the same plane, it should remain the same number.....?

so 414,322 = xplane(along the horizontal axis) is 414 and the yplane( along the verticle axis) is 322. which will define your TOP & LEFT as 414,322

and the bottom right as (550,39) x axis being 550 and y axis as 39... hope this has helped.

but you need to change your (TOP,LEFT) and (BOTTOM,RIGHT) coodinates to suit.

ahhhh so simple thx mate

PS u dont want to know how was i mixing those numbers around :)

thx again!

Link to comment
Share on other sites

ahhhh so simple thx mate

PS u dont want to know how was i mixing those numbers around :)

thx again!

It isn't obvious to me that Aceguy's desription is right but perhaps it's just the way I read it. Just to be sure, you need to know that Y measurements are from the top and X are from the left.

So for a vertical line, 100,20 could be at the top and 100,90 could be at the bottom.

for a horizontal line 100,20 could be at the left and 200,20 could be the right hand end.

So for your box the coordinates would be

(414,40) (550,40)

(414,322) (550,322)

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...