Solved

simulate mouse

Posted on 2000-04-13
6
221 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
Comment Utility
Use mouse_event instead.
0
 
LVL 2

Accepted Solution

by:
craig_capel earned 13 total points
Comment Utility
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
Comment Utility
Hehe...  :-)  Yes, for 13 points I don't give examples!  (-:
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Expert Comment

by:FMayis
Comment Utility
Perhaps you can try the windows function

SendInput
0
 
LVL 2

Expert Comment

by:craig_capel
Comment Utility
FMayis, Please Withdraw your answer........
0
 

Expert Comment

by:FMayis
Comment Utility
FMayis changed the proposed answer to a comment
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now