Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 20:41

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



pixelSearch relativ to another pixel

Discussion on pixelSearch relativ to another pixel within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2008
Posts: 4
Received Thanks: 0
pixelSearch relativ to another pixel

Hei guys,

i want to write a script, that looks for a specific pixel.
if the pixel is found, it should look for another pixel, in the area around the first one.

my problem is:

the array returns a "x" and "y" coordinate, which is a specific point on the screen. i thougt i could take the coordinates and do like "x" -50 = $newx
"y" -50 = $newy
"x" +50 = $new2x
"y" +50 = $new2y
and then PixelSearch($newx, $newy, $new2x, $new2y, 2)
( this is an area around the first pixel found.)

this is not possible for me, i cant figure out how to calculate with the first pixelcoordinates, in order to get an area around the first pixel.

I hope it is clear enough and anyone can help me.

If theres a better way to search for a pixel in an area around another pixel, let me know :P

grettings.
1337_pu55y is offline  
Old 06/28/2013, 11:35   #2
 
Croco™'s Avatar
 
elite*gold: 235
Join Date: Jan 2012
Posts: 920
Received Thanks: 377
I hope this isn't your real code:
Quote:
"x" -50 = $newx
"y" -50 = $newy
"x" +50 = $new2x
"y" +50 = $new2y
But something like that should work:
Code:
$Pixel = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0xFFFFFF)
	If IsArray($Pixel) Then
		$X 	= $Pixel[0]-50
		$Y	 = $Pixel[1]-50
		$X2 	= $Pixel[0]+50
		$Y2 	= $Pixel[1]+50
		$New = PixelSearch($X,$Y,$X2,$Y2,0x00FF00)
	EndIf
Croco™ is offline  
Thanks
1 User
Old 06/28/2013, 12:13   #3
 
elite*gold: 0
Join Date: Apr 2008
Posts: 4
Received Thanks: 0
No this isnt my real code, its just to express what i was trying, since my english is not the best

But your code seems to wrk for me, thanks.
1337_pu55y is offline  
Reply


Similar Threads Similar Threads
C# PixelSearch (search screen for pixel)
04/13/2019 - .NET Languages - 6 Replies
This is a very similar to Auto-its PixelSearch functions (since that's what i intended to make it) Basically it creates a bitmap of a region on the screen, converts the image to a 2d array and loops through the array searching for the inputed color. NOTE: to compile this in a VC# 2008 you will need to allow unsafe code (HOW: Project->Properties->Build->Allow unsafe code) public static Point PixelSearch(Rectangle rect, int PixelColor, int Shade_Variation) { ...
code : Mauszeiger von pixel x zu pixel x bewegen
06/04/2012 - AutoIt - 9 Replies
Hey ich hab mich noch nicht wirklich mit Auto it beschäftigt Ich suche eben einen code der den Mauszeiger von Position x zu position x bewegt . Und AutiIt hat doch eine Funktion um die position zu ermitteln also der Punkt ist meinetwegen 1773 pixel. mfg and thx 4 help;) nicki240
pixelsearch: wie finde ich ein pixel?????
07/04/2009 - AutoIt - 6 Replies
ich habe einen bot erstellt der mit pixelsearch gehen soll..... aber ich weiß nicht wie ich die coordinaten für die pixelserachfunktion finde in der sufu hab ich nichts gefunden hoffentlich könnt ihr mir helfen



All times are GMT +1. The time now is 20:42.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.