SRL Archive - Help

Random Question


All that is man

2009-08-04 01:08:02

Ok, I really didn't know how where to put this… but here goes. I was wondering how does SCAR click the mouse, how does
 ClickMouse(555, 555, true); 
Click the mouse at (555, 555). I just had that random thought so I thought i'd ask ;) Thanks.

bloooblooo

2009-08-04 01:25:54

SCAR uses the windows libraries (which include a mouse controller) to signal a mouse movement. Basically, it can directly change the pointer position.


I'm not sure how to explain it any more than that, because Microsoft writes the rest of the libraries beyond that.

bullzeye95

2009-08-04 01:40:52

If you are asking for the code, it probably looks something like this:
procedure ClickMouse(x, y: Integer; left: Boolean);
begin
SetCursorPos(x {+ x pos of client}, y {+ y pos of client});
if(Left)then
begin
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
end else begin
mouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0);
end;
end;

Though I'm not sure exactly how it was written, that serves the same purpose.

All that is man

2009-08-04 02:08:56

Ok thanks guys, just a little question I had ;)