pixel bot - need help

08/22/2011 18:32 t3z3a1#1
not sure if this is the right section but need help with this script using AutoIt this is my 1st time creating a script and would like help please
Code:
$Colors[2]=[0xA5A2A5, 0xA5A2A5]
While 1
For $i=0 To 2

$pixelSearch=PixelSearch(560, 28, 769, 368, $Colors[$i])
If IsArray($pixelSearch)=1 Then
MouseClick("left",$pixelSearch[0],$pixelSearch[1],1,0)
Sleep(1000)
MouseMove(518, 204, 10)
Sleep(1000)
MouseClick("left")
EndIf
Next
WEnd
The errors i am getting is

Code:
C:\Documents and Settings\User\Desktop\bot\pixel.au3(1,13) : ERROR: syntax error
$Colors[2]=([
~~~~~~~~~~~~^
C:\Documents and Settings\User\Desktop\bot\pixel.au3(1,22) : ERROR: unbalanced paranthesis expression.
$Colors[2]=([0xA5A2A5,
~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\User\Desktop\bot\pixel.au3(1,34) : WARNING: $Colors possibly not declared/created yet
$Colors[2]=([0xA5A2A5, 0xA5A2A5])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\User\Desktop\bot\pixel.au3 - 2 error(s), 1 warning(s)
thanks for help.