INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Jobs from Indeed

Help with mouse event api

Help with mouse event api

(OP)
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

------------------------------
http://niphyr.topcities.com
------------------------------

RE: Help with mouse event api

(OP)
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.

------------------------------
http://niphyr.topcities.com
------------------------------

RE: Help with mouse event api

It's not complicated. Honest. See my code in Thread222-788381

RE: Help with mouse event api

(OP)
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 :)

------------------------------
http://niphyr.topcities.com
------------------------------

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close