View Full Version : Random Question
All that is man
08-04-2009, 05:08 AM
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
08-04-2009, 05:25 AM
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
08-04-2009, 05:40 AM
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
08-04-2009, 06:08 AM
Ok thanks guys, just a little question I had ;)
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.