major_lee Posted April 10, 2021 Share Posted April 10, 2021 It logs the info for pixels, used with the mouse in example I made for capability extending AutoIt v3 Window Info. Now with this I can see how often the color has been. I made because i was getting interference (from Custom Mouse Curser Animation) with AutoIt v3 Window Info. Now I can see the most common color. I am no expert at this so maybe others know of a better way of this? I would love to hear. expandcollapse popup#include <AutoItConstants.au3> #include <MsgBoxConstants.au3> #include <Array.au3> ; Required for _ArrayDisplay. HotKeySet("{END}","quit") local $i,$j =0 Local $pixelLogg[0][2] $sFill = "pixel" &"|"& "#####" _ArrayAdd($pixelLogg, $sFill) ToolTip("BOOT",0,0) Sleep(2000) Func quit() _ArrayDisplay($pixelLogg) Exit EndFunc Func _PixelGetColorLog($pixel) ;; to extend ?? Local $iRows = UBound($pixelLogg, $UBOUND_ROWS) ; Total number of rows. In this example it will be 10. Local $iCols = UBound($pixelLogg, $UBOUND_COLUMNS) ; Total number of columns. In this example it will be 20. Local $iDimension = UBound($pixelLogg, $UBOUND_DIMENSIONS) ; The dimension of the array e.g. 1/2/3 dimensional. $pixel = Hex($pixel,6) ToolTip($pixel,0,0) For $i = 0 To $iRows - 1 For $j = 0 To $iCols - 1 ConsoleWrite("["&$i&"],["&$j&"]"&$pixelLogg[$i][$j] &@CRLF) if($pixelLogg[$i][$j] == $pixel) Then ConsoleWrite("++" &@CRLF) $pixelLogg[$i][$j+1] = $pixelLogg[$i][$j+1] +1 ExitLoop ExitLoop EndIf If ($i == $iRows-1 ) Then ConsoleWrite("_ArrayAdd" &@CRLF) $sFill = $pixel &"|"& 1 _ArrayAdd($pixelLogg, $sFill) ExitLoop ExitLoop EndIf Next Next EndFunc While 1 $MousePos = MouseGetPos() $pixelMouse = PixelGetColor($MousePos[0],$MousePos[1]) _PixelGetColorLog($pixelMouse) Sleep(100) WEnd Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 10, 2021 Moderators Share Posted April 10, 2021 major_lee, And just what is the point of this script? What function does it fill? Why is it needed? M23 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 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