Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a way to bind a mouse click to a key press?
#1
but what i want to
do is click the left mouse button at (x.y) by pressing Z then click at (A,B)
by pressing X

also, should i be asking somewhere else?

Thanks for the help
Himansh.
The Power to Believe in Yourself is the Power to change the Fate!
#2
I don't know if there is a way to programatically move the cursor on the screen. If there is, I have never heard of it.
My Blog | My Setup | My Videos | Have a wonderful day.
#3
to move the mouse

Code:
Cursor.Position = New Point(MouseposX, MouseposY)

mouse click

Code:
Public Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
    Public Const MOUSEEVENTF_LEFTDOWN = &H2
    Public Const MOUSEEVENTF_LEFTUP = &H4
    Public Const MOUSEEVENTF_MIDDLEDOWN = &H20
    Public Const MOUSEEVENTF_MIDDLEUP = &H40
    Public Const MOUSEEVENTF_RIGHTDOWN = &H8
    Public Const MOUSEEVENTF_RIGHTUP = &H10
    Public Const MOUSEEVENTF_MOVE = &H1
  mouse_event(mouseclickup = 0, 0, 0, 0, 0)
        mouse_event(mouseclickdown = 0, 0, 0, 0, 0)
Private Const mouseclickup = 4
    Private Const mouseclickdown = 2
Website: <!-- m --><a class="postlink" href="http://www.PBAProductions.com">http://www.PBAProductions.com</a><!-- m -->
E-Mail: <!-- e --><a href="mailtoTongueatrick@AriSystems.Org">Patrick@AriSystems.Org</a><!-- e -->
Skype: Qwaxer
Youtube: Qwaxer
[Image: 2hnx8av.jpg]
#4
Thanks All the above users
!!!!!!!!!!!!!
The Power to Believe in Yourself is the Power to change the Fate!
#5
xolara Wrote:to move the mouse
Code:
Cursor.Position = New Point(MouseposX, MouseposY)

Ah, that could come in handy.. thanks!
My Blog | My Setup | My Videos | Have a wonderful day.


Forum Jump:


Users browsing this thread: 1 Guest(s)