Solved

simulate mouse

Posted on 2000-04-13
6
229 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 13 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

691 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