Hi everyone!
I'm trying to make the mouse moving by following a light. And clicking the left button when the light is on.
So, I use Center of Gravity to find the position of the light and then moving the cursor... But I have a problem when trying to make it clicking.
I use this VBscript to know if the Center of Gravity exists, and if it does, it set the Z variable (used in button status in mouse module) to LEFT DOWN, and if it doesn't to LEFT UP.
if (GetVariable("COG_AREA") > 1) then
SetVariable "Z", "LEFT_DOWN"
else
SetVariable "Z", "LEFT_UP"
end if
But in this way, the cursor continuously press and then release, in spite of remaining pressed.. So, if I try to draw something in Paint or any other program, i have lot of points and not a line...
I thought that maybe this is because of the real mouse isn't pressed, and the module mouse set the variable Z by the status of the real button. But if it's so, I don't know what i can do...
Any suggestion? thanks a lot! and sorry for my poor English :P
Bye!
|
|