simulate mouse

Hi,

need some code to use a mouse without a mouse.. i have got the moving arround part setcursorpos(x,y); but now i have to simulate a click and a double click and a right click.

giving all my points
ginamriAsked:
Who is Participating?
 
craig_capelConnect With a Mentor Commented:
Madshi, getting less willing for examples?....

var
 ex,but: integer;
begin
setcursorpos(29,584);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,but,ex);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,but,ex);
end;

(Goto 800 x 600 for this example)
0
 
MadshiCommented:
Use mouse_event instead.
0
 
MadshiCommented:
Hehe...  :-)  Yes, for 13 points I don't give examples!  (-:
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
FMayisCommented:
Perhaps you can try the windows function

SendInput
0
 
craig_capelCommented:
FMayis, Please Withdraw your answer........
0
 
FMayisCommented:
FMayis changed the proposed answer to a comment
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.