Jeanpierre92 Posted April 15, 2010 Posted April 15, 2010 (edited) I got a problem with: PixelSearch ( left, top, right, bottom, color [, shade-variation [, step [, hwnd]]] ) shade-variation [optional] A number between 0 and 255 to indicate the allowed number of shades of variation of the red, green, and blue components of the colour. Default is 0 (exact match). I dont understand the explaination . If you got a color like: Red: 100 Blue: 20 Green: 250 and you set the Shade variation to 10, and it finds a color like this: R:80 B:15 G:100 will the script take that color as found? or must it be: R:80+-10, B:15 +-10, G:100+-10? Or just only one must be in range of +-10 shades? Thanks, Jeanpierre Edited April 15, 2010 by Jeanpierre92
Moderators Melba23 Posted April 15, 2010 Moderators Posted April 15, 2010 (edited) Jeanpierre92,I have no idea what AutoIt actually does internally, but logically the shade must apply to all 3 colour elements. If it only applied to one, then the colours which would fire a positive response from the function could be completely different:R:100 B:20 G:250 Shade:10 R:255 B:15 G:0 ; Almost pure red R:0 B:15 G:235 ; Almost pure bluewhich would rather defeat the object of the command. So I would suggest your "R:80+-10, B:15+-10, G:100+-10" suggestion is the correct one. M23Edit: Typnig! Edited April 15, 2010 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Jeanpierre92 Posted April 15, 2010 Author Posted April 15, 2010 aah thanks for the very logic explain Now I see its logic that all the 3 colors must be + or - the shade variation.
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