Click here to Skip to main content
16,010,553 members

Comments by DatSik (Top 5 by date)

DatSik 4-Apr-14 19:56pm View    
Awesome, thank you for the input. I will tweak my code a bit and see what happens! Thanks again. I hope this helps anyone else with the same issue
DatSik 4-Apr-14 18:09pm View    
Well my problem is that it seems no matter what coordinates i put it it always just seems to go to the top left corner of my screen..constantly, I dont understand it. And yes sir please check it out for me and see what we can do to get it going the right way.
DatSik 4-Apr-14 14:41pm View    
I never what whining? I simply asked for a clear example? Thats all, I searched this site up and down with no luck..This is what I have so far and i wanted to compare what i have to other examples to make sure im in the clear.
var
Inputs: array[0..2] of TInput;
begin
Input.Type := INPUT_MOUSE;
Input.mi.dx := XCoordinate;
Input.mi.dy := YCoordinate;
Input.mi.mouseData := 0;
Input.mi.dwFlags := MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_MOVE;
Input.mi.time := 0;
Input.mi.dwExtraInfo := 0;

Input.Type := INPUT_MOUSE;
Input.mi.dx := 0;
Input.mi.dy := 0;
Input.mi.mouseData := 0;
Input.mi.dwFlags := MOUSEEVENTF_LEFTDOWN;
Input.mi.time := 0;
Input.mi.dwExtraInfo := 0;

Input.Type := INPUT_MOUSE;
Input.mi.dx := 0;
Input.mi.dy := 0;
Input.mi.mouseData := 0;
Input.mi.dwFlags := MOUSEEVENTF_LEFTUP;
Input.mi.time := 0;
Input.mi.dwExtraInfo := 0;

SendInput(Length(Inputs), Inputs[0], SizeOf(TInput));
end;

Or

var
Input: TInput;
begin
Input.Type := INPUT_MOUSE;
Input.mi.dx := XCoordinate;
Input.mi.dy := YCoordinate;
Input.mi.mouseData := 0;
Input.mi.dwFlags := MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_MOVE or MOUSEEVENTF_LEFTDOWN
or MOUSEEVENTF_LEFTUP;
Input.mi.time := 0;
Input.mi.dwExtraInfo := 0;

SendInput(1, Input, SizeOf(TInput));
end;
DatSik 4-Apr-14 12:42pm View    
Deleted
lol big and powerful internet man
DatSik 4-Apr-14 3:10am View    
I didnt mean it was very complicating, Just that it seems like a big mess compared to Mouse_events is all. And i cannot find any good examples on using it. I really dont wanna dive into specifics of what im doing. Im asking for some good examples on moving the mouse via SendInput. Thank you