Sign in to follow this  
Followers 0
pandan

need help with autoit

2 posts in this topic

ehm, hey, firstly im not american so my english isnt flawless

my knowledge about scripting is pretty weak

i ve made a short command that finds pixel and presses it

$Coord = PixelSearch(612, 612, 811, 660, 0xB0E291, 10 )
If Not @error Then
   MouseMove($coord[0], $coord[1], 0)
mouseclick("left")

im looking for help with this to make this like :

$Coord = PixelSearch(612, 612, 811, 660, 0xB0E291, 10 ) 
or

$Coord = PixelSearch(612, 612, 811, 660, 0xB0E291, 10 ) other color
or
$Coord = PixelSearch(612, 612, 811, 660, 0xB0E291, 10 ) other color

If Not @error Then
   MouseMove($coord[0], $coord[1], 0)
mouseclick("left")

it has to look for pixels between 3 different colors and press all of them, no metter what order

hope its clear and u understand what i want to say

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi, Pandan;

Are you trying to cycle through the three colors in a loop? If so, you could do something like this:

Local $coord[3]
$coord[0] = PixelSearch(612, 612, 811, 660, 0xB0E291, 10)
$coord[1] = PixelSearch(612, 612, 811, 660, 0xB0E291, 10)
$coord[2] = PixelSearch(612, 612, 811, 660, 0xB0E291, 10)
For $element in $coord
If Not @error Then
  MouseMove($element[0], $element[1], 0)
  mouseclick("left")
EndIf
Next
Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0