Sign in to follow this  
Followers 0
zero57

Beginner Pixelsearch...

11 posts in this topic

Hey, I wanna learn pixelsearch, and i was wondering if anyone knows where to find a beginner pixelsearch tutorial or atleast a really really easy pixelsearch tutorial to memorize.

Thx to all who could help me or atleast try to help me :)

Peace!


[font="Arial Black"][u]zero57[/u][/font]

Share this post


Link to post
Share on other sites



Well the first bit of advice would be to use the autoit window info tool...if you click on the summary tab it will show you position of your cursor and the color of that pixel. so lets say you want to search all pixels in an area of the screen(say 100pixels by 300 pixels) and we want to find black. first find the starting pixel with the info tool(right down the x/y), then go over 100pixels to the right(write down the x/y), go down 300 and mark the x/y and then left 100 and mark the x/y. you may not need to write all those points, but I am trying to just be completly clear.

now you know all the points and what color you want to find...in our case black or in Hex 0x000000.

now lets search for that pixel color..

$coord = PixelSearch( 0, 0, 100, 300, 0x000000 )

If Not @error Then

MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])

EndIf

OK so thats about it..

$coord is an array, [0]=x [1]=y


I like cookies?

Share this post


Link to post
Share on other sites

Well the first bit of advice would be to use the autoit window info tool...if you click on the summary tab it will show you position of your cursor and the color of that pixel. so lets say you want to search all pixels in an area of the screen(say 100pixels by 300 pixels) and we want to find black. first find the starting pixel with the info tool(right down the x/y), then go over 100pixels to the right(write down the x/y), go down 300 and mark the x/y and then left 100 and mark the x/y. you may not need to write all those points, but I am trying to just be completly clear.

now you know all the points and what color you want to find...in our case black or in Hex 0x000000.

now lets search for that pixel color..

$coord = PixelSearch( 0, 0, 100, 300, 0x000000 )

If Not @error Then

MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])

EndIf

OK so thats about it..

$coord is an array, [0]=x [1]=y

Ok thx, But do you have any tips on helping me to find green? i mean i wanna make a bot of my own for curveball.

[font="Arial Black"][u]zero57[/u][/font]

Share this post


Link to post
Share on other sites

Ok thx, But do you have any tips on helping me to find green? i mean i wanna make a bot of my own for curveball.

sure...

use the window tool and mouse over the color you want to search for...in this case the green color. In the window tool it will tell you what the pixel location is and what the hex value is. So you just follow the steps before to find the upper left x/y and fin the other points.

you could do something like....

$coord = PixelSearch( 0, 0, 100, 300, 0x000000 )

If Not @error Then

;;do whatever you want it to do when it finds green here, my example will be to send a key

Send("{q}")

EndIf

This case would search for a pixel(0x000000) between 0-100on the x and 0-300 on the y. If it finds the color its searching for, this sends the key q.


I like cookies?

Share this post


Link to post
Share on other sites

sure...

use the window tool and mouse over the color you want to search for...in this case the green color. In the window tool it will tell you what the pixel location is and what the hex value is. So you just follow the steps before to find the upper left x/y and fin the other points.

you could do something like....

$coord = PixelSearch( 0, 0, 100, 300, 0x000000 )

If Not @error Then

;;do whatever you want it to do when it finds green here, my example will be to send a key

Send("{q}")

EndIf

This case would search for a pixel(0x000000) between 0-100on the x and 0-300 on the y. If it finds the color its searching for, this sends the key q.

Thx man!


[font="Arial Black"][u]zero57[/u][/font]

Share this post


Link to post
Share on other sites

use the window tool and mouse over the color you want to search for...in this case the green color. In the window tool it will tell you what the pixel location is and what the hex value is. So you just follow the steps before to find the upper left x/y and fin the other points.

Pardon my ignorance, I am new here. What is the "window tool" please and where do I find it?

Share this post


Link to post
Share on other sites

revloc02,

Welcome to the AutoIt forum. :mellow:

The Au3 Window Info Tool lets you investigate windows and controls in other apps so you can interact with them. If you have a standard install you can find it at "C:\Program Files\AutoIt3\Au3Info.exe".

It is pretty easy to use. :(

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

revloc02,

Welcome to the AutoIt forum. :(

The Au3 Window Info Tool lets you investigate windows and controls in other apps so you can interact with them. If you have a standard install you can find it at "C:\Program Files\AutoIt3\Au3Info.exe".

It is pretty easy to use. :lol:

M23

Got it, thank you. And you are right it is pretty easy to use. :mellow:

Share this post


Link to post
Share on other sites

hello,

what i want to know is,

how to make that pixelsearch do such a loop

cause i try the script and it just run once then closed

thx

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