Zeonx Posted June 21, 2020 Posted June 21, 2020 I'm really new to autoit and writing scripts in general What I'm trying to do Create a simple script that would click the closet pixel from the middle outwards; Instead of pixel search top left to bottom right I need to find a way to click a pixel closest to the middle of the search box area, starting from the middle of the box and searching pixels outwards imagine an outwards spiral circle search pattern if you will. ;here is my script $color = (colorhere) while(1) $pix = PixelSearch(11, 36, 1399, 954, $Color,5) if not (@error) then MouseClick("left", $pix[0], $pix[1],1,1) sleep(Random(1000,2000)) EndIf WEnd If you can help thanks in advanced I've hit a wall and am stuck. Below I've drawn a simple diagram and would like the pixelsearch to click the boxes prioritizing numbers 1-10 in that order where 1 would always come first because it's closer to the center.
Zeonx Posted June 21, 2020 Author Posted June 21, 2020 Or if that isn't possible, I could add multiple pixelsearch boxes starting from the middle where the middle would get prioritized how would I go about that?
careca Posted June 21, 2020 Posted June 21, 2020 make the start coordinate half of the total width. You can make a somewhat complex function that searches in a spiral, but you have to figure out the maths to make it search like that Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
Zeonx Posted June 21, 2020 Author Posted June 21, 2020 Thanks for the quick reply @careca This is how I interoperate what you said half the search area, while this would be a good idea and a step in the right direction the other points outside of the half'd search area would be missing and pixel search would still prioritize top left over closer points towards the middle, I'm trying to comprehend a way to make this possible. Even leaning towards paying some body for help if this is allowed on this forum.
Nine Posted June 21, 2020 Posted June 21, 2020 The approach I would use would be to take a screenshot of the screen and move the pixels to a 2D array. After that you could use the proper algorithm to search into specific area of the screen. Out of curiosity, what is the application you are trying to automate ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
AutoBert Posted June 21, 2020 Posted June 21, 2020 Have a look to: https://www.autoitscript.com/forum/topic/126430-advanced-pixel-search-library/?tab=comments#comment-877543
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