Gawker Posted September 15, 2020 Posted September 15, 2020 Hi I'm new with autoit and I need some help, I want to find some color on the screen and save the position to variable... But... The color changing after few seconds, and then I need to save it, and replicate the colors in the same order... I wonder if you have any lead /sample how to do it
Developers Jos Posted September 15, 2020 Developers Posted September 15, 2020 Moved to the appropriate forum. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Developers Jos Posted September 15, 2020 Developers Posted September 15, 2020 Welcome, So what have you tried yet that isn't working? What app needs this kind of automation anyways? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Gawker Posted September 15, 2020 Author Posted September 15, 2020 I tried to search via pixelsearch and save it to array with _addarray (in while)... But I can't figure it out how to save it and replicate the steps back to screen... I'm trying to automate chrome
Developers Jos Posted September 15, 2020 Developers Posted September 15, 2020 Share your code and the exact issue and you might get some support. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Gawker Posted September 16, 2020 Author Posted September 16, 2020 OK... In this example i'm only try to find two colors And Write Them To Console, i have tried two different methods in the if's but nothing work HotKeySet("{F1}", loco) #include <Array.au3> Local $Coords Local $Array[1] Local $Black = 0x000000 Local $NoCol = 0xFFFFF While 1 $Coords = PixelSearch(0, 0, @DesktopWidth - 1, @DesktopHeight - 1, $$Black) if Not @Error Then _ArrayAdd($Array,"Black") $Coords = PixelSearch(0, 0, @DesktopWidth - 1, @DesktopHeight - 1, $NoCol) if IsArray($Coords) Then _ArrayAdd($Array,"Test") ;If ($Array[0] or StringLen($Array)) Then ConsoleWrite("Color: " & $Array[0] & @CRLF) ; MouseClick("Left",$Coords[0],$Coords[1],1,5) ;EndIf ;Sleep(1000) WEnd Func loco() Exit 12 EndFunc
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