views:

111

answers:

0

I have a application that clicks on a flash game with the mouse, Locations of clicks are working fine its the actual clicking that is the issue, although this might be the flash that is to blame..

I have this code

procedure move(x,y:byte);
begin
  SetCursorPos(getx(x)+21,gety(y)+21);
  sleep(15);
  mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
  sleep(20);
  mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
  sleep(20);
end;

But when i see this in action it is only clicking on the correct locations every few seconds,, it apears to be darting around the screen going to the right places but not clicking, It would appear that i am clicking to fast as increasing sleep time does yeild better click results.. but i am wishing maximum click results i wish fast and successfull clicks,, missed clicks are as good as no click at all...

Would this be a issue with windows regestering a click or the flash aplication,,,

I had assumed maybe if i click and move before the flash application gets its interleaved thred procceced that maybe it would try find mouse x,y etc and think the click was in another position,, resulting in my clicks gathering in to one click as view via the flash aplication... is this solvable?