Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with mouse event api

Status
Not open for further replies.

Niphyr

Programmer
Jul 21, 2003
85
AU
Basically i want he mouse to move to a certain spot (x,y) and left click, then another and right click.

I have been messing with the mouse event api but can't quite figure it out.

:
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Const MOUSEEVENTF_LEFTDOWN = &H2
Const MOUSEEVENTF_LEFTUP = &H4
Const MOUSEEVENTF_MIDDLEDOWN = &H20
Const MOUSEEVENTF_MIDDLEUP = &H40
Const MOUSEEVENTF_MOVE = &H1
Const MOUSEEVENTF_ABSOLUTE = &H8000
Const MOUSEEVENTF_RIGHTDOWN = &H8
Const MOUSEEVENTF_RIGHTUP = &H10


------------------------------
------------------------------
 
All i want to do is move the mouse to (x1,y1) and right click. then move the mouse to (x2,y2) and left click.

I never thought it'd be so darn compliacted.

------------------------------
------------------------------
 
It's not complicated. Honest. See my code in thread222-788381
 
I fixed it...when i get home i'll post it. and good to see you are still around strongm....i was around 2-3 years ago ^^

My problem was i was using the wrong value, meaning all future mouse movements were from the last movement point...not specific to the screens coordinates.

Work's fine now :)

------------------------------
------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top