Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...