A pretty simple program, it looks cool though.
Pseudo Code:
Create bounding boxes over the selected colour, if there are two boxes, connect a line from the center of the two boxes. The center point of that line will be the mouse location.
If there is only one box, center point of that box will be location of the mouse and press the left button of the mouse.
It works pretty well, but the mouse movement is always a bit jitterish. The implementation of the left click is not very intuitive and most of the times it creates havoak. Needs improvement in those areas.
Future work:
Create a buffer zone around the mouse pointer to avoid jitter movements.
A better way to implement left click of the mouse.
留言