how did you define CornerColor1 and cc4? Maybe it's in the wrong format? Just looking at it, PixelSearch expects it to be in 0xrrggbb.
For testing --> Make a new function, which tells you the color under the mouse, and make sure it gives good output. ie. put your mouse over a black region and see what value is returned, then try for a white region, the red, then blue etc. ? (maybe don't check right at the cursor position, because it might capture the the color of your cursor icon - so do GetPixelColor(MouseX,MouseY - 5) and tell us what results you find)
Code:
Function DoSomeTesting
$cursPos = MouseGetPos()
$curColor = GetPixelColor($curPos[0], $curPos[1] - 5)
msgbox("Color under mouse is: " & $curColor)
EndFunction
//I didn't look up syntax for msgbox function. it's just example.
edit: What's the bigger picture? Do you plan to only make small programs for small games? If so, auto-it is perfect. But if you want to be programmer, auto-it is bad.Free C# and Visual Studios from microsoftdotcom may* be better tool than auto-it.