Jump to content
Sign in to follow this  
amakrkr

colour detection with help of _ScreenCap_Capture

Recommended Posts

amakrkr

Hi all,

i have a question about this function....

well first i do not understand syntax of it....

_ScreenCap_Capture("filename", x, y, w, h [, quality])

i understand we are searching inside a box but i just dont know how to set the LEFT, RIGHT, UP and DOWN coordinates?

I take (x,y) or just x r what?

Then after i get it (captured location) how do i use it? (i want to find specific colour inside of it)

I mean it will be sade in a special locaton as .jpg, but how do i Pixelsearch(?) it?

I have to code all this in 3.2.4.9 version because of some "compatibility issue" with anticheat program.

Any way i hope u understand my questions (i know my english sux).

PS yes i did searched/googled and used help file but couldnt find any answers to my questions.

Share this post


Link to post
Share on other sites
John117

Captures a region of the screen

#Include <ScreenCapture.au3>

_ScreenCapture_Capture([$sFileName = ""[, $iLeft = 0[, $iTop = 0[, $iRight = -1[, $iBottom = -1[, $fCursor = True]]]]]])

Parameters

$sFileName Full path and extension of the image file

$iLeft X coordinate of the upper left corner of the rectangle

$iTop Y coordinate of the upper left corner of the rectangle

$iRight X coordinate of the lower right corner of the rectangle. If this is -1, the current screen

width will be used.

$iBottom Y coordinate of the lower right corner of the rectangle. If this is -1, the current screen

height will be used.

$fCursor If True the cursor will be captured with the image

#include <ScreenCapture.au3>
;Place to save and file to save name (read the rest up top)
_ScreenCapture_Capture(@MyDocumentsDir & "\GDIPlus_Image2.jpg", 0, 0, @DesktopWidth, @DesktopHeight)

All this does is save a pic. It is not a pixel search

Share this post


Link to post
Share on other sites
amakrkr

Yeah but problem is i dont know how to use that captured picture now.

My problem is that i need to take sreen shot and analize it (search for specific pixel on screen)

then to use that coordinate where pixel it like:

If $color==color then

Send("tralala")

else

Send("somthing else")

i hope u know what i mean >.<

thx

Share this post


Link to post
Share on other sites
amakrkr

so how do you search for a pixel when u have that region of a sreen saved?

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.