?
Solved

simulate mouse

Posted on 2000-04-13
6
Medium Priority
?
232 Views
Last Modified: 2010-04-04
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
0
Comment
Question by:ginamri
  • 2
  • 2
  • 2
6 Comments
 
LVL 20

Expert Comment

by:Madshi
ID: 2710986
Use mouse_event instead.
0
 
LVL 2

Accepted Solution

by:
craig_capel earned 52 total points
ID: 2711336
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
 
LVL 20

Expert Comment

by:Madshi
ID: 2711349
Hehe...  :-)  Yes, for 13 points I don't give examples!  (-:
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:FMayis
ID: 2711465
Perhaps you can try the windows function

SendInput
0
 
LVL 2

Expert Comment

by:craig_capel
ID: 2711541
FMayis, Please Withdraw your answer........
0
 

Expert Comment

by:FMayis
ID: 2711578
FMayis changed the proposed answer to a comment
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Integration Management Part 2
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

755 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question