MDMAlex Posted October 8, 2018 Posted October 8, 2018 Here is my script expandcollapse popup#include <AutoItConstants.au3> While 1 $Variable = PixelSearch(878, 599, 880, 600, 0x850505) If IsArray($Variable) = True Then MouseClick("Left", $Variable[0], $Variable[1], 1) Sleep(2500) Else $Variable = PixelSearch(720, 580, 1100, 840, 0xEECCBB, 2) If IsArray($Variable) = True Then MouseClick("Left", $Variable[0], $Variable[1], 1) Sleep(5000) MouseClick("Left", 1129, 885, 1) Sleep(2500) MouseClick("Left", 1129, 885, 1) Local $iColor = 0 Do Sleep(10000) Local $iColor = PixelGetColor(1059, 975) Until $iColor = 0xD4F8FF MouseClick("Left", 961, 954, 1) Do Sleep(2500) MouseClick("Left", 961, 954, 1) Local $iColor = PixelGetColor(1172, 976) Until $iColor = 0xFFFFFF Sleep(5000) MouseClick("Left", 1172, 976, 1) Sleep(2500) Else $Variable = PixelSearch(720, 580, 1100, 840, 0xFF6300) If IsArray($Variable) = True Then MouseClick("Left", $Variable[0], $Variable[1], 1) MouseClick("Left", 960, 274, 1) Else MouseClick("Left", 1284, 597, 1) Sleep(2500) EndIf EndIf EndIf WEnd And I want to search for like 6 different colors in line 9 "$Variable = PixelSearch(720, 580, 1100, 840, 0xEECCBB, 2)" since the colors I am looking for are not really similar, I do not know what to do, it would be great if someone could help me.
Sw4rM Posted October 28, 2018 Posted October 28, 2018 Please see shade-variation of pixelsearch function in Autoit Help
Nine Posted October 28, 2018 Posted October 28, 2018 The idea is to take a screensave of the region you want to check, convert that into a double array of pixels with gdi. Let me know if you cant find code source of it. I know it is out there, just search for it. “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
MaximusCZ Posted October 29, 2018 Posted October 29, 2018 I use this, its able to do like 50 000 checks / second
Bert Posted October 29, 2018 Posted October 29, 2018 I see your pixel search is in a large area. What app are you automating? I ask for pixel searching is terrible for automation. The Vollatran project My blog: http://www.vollysinterestingshit.com/
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