Code: Select all
//This color is part of my firefox icon.
//It may not be part of yours.
Let>ColorToFind=1134801
GoSub>DrawLine,0,1,ColorToFind,0,0,1,1
ScreenCapture>0,0,1,1,%temp_dir%\Color_%colorToFind%.bmp
FindImagePos>%temp_dir%\Color_%colorToFind%.bmp,SCREEN,1,1,x_pos,y_pos,num_found
Sub>num_found,1
If>num_found<1
MDL>Color %ColorToFind% not found.
Else
Let>kk=0
Repeat>kk
Add>kk,1
Let>curX=x_pos_%kk%
Let>curY=y_pos_%kk%
MouseMove>CurX,curY
Wait>0.01
//Start: Do Something at Pixel Location
Message>Mouse moved to screen position %CurX%,%CurY%
Wait>2
//End: Do Something at Pixel Location
Until>kk,%num_found%
EndIf
//GoSub>DrawLine,WindowHandle,PenSize,PenColor,XStart,YStart,XEnd,YEnd
SRT>DrawLine
LibFunc>user32,GetDC,HDC,%DrawLine_var_1%
LibFunc>gdi32,CreatePen,Penres,0,%DrawLine_var_2%,%DrawLine_var_3%
LibFunc>gdi32,SelectObject,SOPres,hdc,Penres
Libfunc>gdi32,MoveToEx,mtres,HDC,%DrawLine_var_4%,%DrawLine_var_5%,0
LibFunc>gdi32,LineTo,ltres,hdc,%DrawLine_var_6%,%DrawLine_var_7%
LibFunc>gdi32,DeleteObject,DOres,Penres
LibFunc>user32,ReleaseDC,RDCres,HDC_1,HDC
END>DrawLine