Smart questions
Smart answers
Smart people
Join Tek-Tips Forums
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • 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!

Join Tek-Tips
*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 from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Niphyr (Programmer) (OP)
8 Feb 05 4:56
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
------------------------------

Niphyr (Programmer) (OP)
8 Feb 05 6:38
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
------------------------------

HermanvLimbeek (Programmer)
12 Feb 05 18:16
strongm (MIS)
12 Feb 05 18:54
It's not complicated. Honest. See my code in Thread222-788381
Niphyr (Programmer) (OP)
16 Feb 05 21:25
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
------------------------------

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!

Back To Forum

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