tubbybunz Posted July 1, 2006 Share Posted July 1, 2006 Hi, I'm brand new to AutoIt and have only programmed a TI-83, so please forgive me if I end up on here every day asking dumb questions. Anyhow, I want to do a pixel search of an area, but I don't want it to be a straight up and down rectangle (it's more like a rectangle rotated 45 degrees). The coordinates that are required in PixelSearch don't seem to allow this, however. Am I missing something or is there a way to get around this? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 1, 2006 Moderators Share Posted July 1, 2006 (edited) Hi, I'm brand new to AutoIt and have only programmed a TI-83, so please forgive me if I end up on here every day asking dumb questions. Anyhow, I want to do a pixel search of an area, but I don't want it to be a straight up and down rectangle (it's more like a rectangle rotated 45 degrees). The coordinates that are required in PixelSearch don't seem to allow this, however. Am I missing something or is there a way to get around this?I don't know if you are missing something, maybe just mis-understanding? Local $xTopLeft_StartPosition = 0 Local $yTopLeft_StartPosition = 0 Local $xBottomRight_EndPosition = 200 Local $yBottomRight_EndPosition = 100 Local $iColor = 0xFF0000 ; Hex color Local $iShadeVariation = 10 ; up to 10 shades differnce either way Local $iStep = 0 ; how many pixels to skip each search $aPSearch = PixelSearch($xTopLeft_StartPosition, $yTopLeft_StartPosition, $xBottomRight_EndPosition, $yTopLeft_StartPosition, $iColor, $iShadeVariation, $iStep) If IsArray($aPSearch) Then MsgBox(64, 'Info:', 'X Found is : ' & $aPSearch[0] & @CR & 'Y Found is : ' & $aPSearch[1])Hope that helps. Edit: Seems that Ebonics was overcomming my itterations. Edited July 1, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now