Sign in to follow this  
Followers 0
amakrkr

Pixelsearch function

6 posts in this topic

#1 ·  Posted (edited)

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

Share this post


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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

(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

Share this post


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

Share this post


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

Share this post


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

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