Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 02-14-2005, 06:23
bart
 
Posts: n/a
in delphi

Code:
//
// symulacja klikniecia lewym kneflem myszki
//
procedure SingleClick(X: Integer; Y: Integer; SaveOriginal:Boolean = False);
var mousepos:TPoint;
begin

  // pobierz oryginalne polozenie kursora
  if SaveOriginal = True then GetCursorPos(mousepos);

  // ustaw pozycje kursora myszki
  SetCursorPos(X, Y);

  // symuluj nacisniecie lewego klawisza myszki
  mouse_event(mouseeventf_leftdown,0,0,0,0);

  // symuluj podniesienie lewego klawisza myszki po kliku
  mouse_event(mouseeventf_leftup,0,0,0,0);

  // przywroc oryginalne polozenie kursora
  if SaveOriginal = True then SetCursorPos(mousepos.X, mousepos.Y);

end;
Reply With Quote
  #2  
Old 02-14-2005, 06:37
dyn!o's Avatar
dyn!o dyn!o is offline
Friend
 
Join Date: Nov 2003
Location: Own mind
Posts: 214
Rept. Given: 1
Rept. Rcvd 1 Time in 1 Post
Thanks Given: 8
Thanks Rcvd at 0 Times in 0 Posts
dyn!o Reputation: 1
Bart: I suppose Lilmeanman asked abour more "generic" idea.

Your one is good... assuming we know the screen resolution and button box coordinates

"Knefel" = przycisk? Hmm....

Regards.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is the answered button? Dreamer General Discussion 0 05-07-2015 18:22
Does simulating click affect GetMessagePos()? BlackWhite General Discussion 10 02-14-2015 02:54


All times are GMT +8. The time now is 23:28.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )