Storing Mouse Clicks

Posts 1–10 of 10 · Page 1 of 1
Storing Mouse Clicks
I want to make a program where the user can click multiple times, and the coordinates for the clicks are stored where you can press a hotkey and all the clicks are repeated by the program. I just need to know how to store the coordinates. If anyone can help me, it would be appreciated.
Hmmm.... Try google it! Do you know how to get the cordinates?

U need first to make a timer with some save funticon(maybe my.settings.......) to remember the cordinates then a hotkey:
Code:
hotkey = right.click!
If hotkey = true 
save cordinates!
end if
^^ Will not work because u need a little more hotkey code, search forum and u will find it!

Thats what I think you should do
Quote Originally Posted by Zoom View Post
Hmmm.... Try google it! Do you know how to get the cordinates?

U need first to make a timer with some save funticon(maybe my.settings.......) to remember the cordinates then a hotkey:
Code:
hotkey = right.click!
If hotkey = true 
save cordinates!
end if
^^ Will not work because u need a little more hotkey code, search forum and u will find it!

Thats what I think you should do
i know how to make hotkeys. I need to know how to store the data. But that my.settings is working for now. thanks!

Quote Originally Posted by maarten551 View Post
i made this in a program of me

try it i have source with it to

http://www.mpgh.net/forum/33-visual-...k-o-matic.html (go to under for the better version)
I need something to store around 144 mouse clicks, not just one. But thanks anyways, it's a start. this is easier than my.setting though. i'll give it a try
Quote Originally Posted by gwentravolta View Post
i know how to make hotkeys. I need to know how to store the data. But that my.settings is working for now. thanks!



I need something to store around 144 mouse clicks, not just one. But thanks anyways, it's a start. this is easier than my.setting though. i'll give it a try
Or you can download "doitagain" ! very good software and free!

edit: You can make 2 comx and store y in comx1 and x in comx!
Quote Originally Posted by Zoom View Post
Or you can download "doitagain" ! very good software and free!

edit: You can make 2 comx and store y in comx1 and x in comx!
where's the fun in using someone else's program?
Quote Originally Posted by gwentravolta View Post
where's the fun in using someone else's program?
Idk, i just though u needed a software fast, but GJ on making the program. Btw how will you save the cords?
Quote Originally Posted by gwentravolta View Post
i know how to make hotkeys. I need to know how to store the data. But that my.settings is working for now. thanks!



I need something to store around 144 mouse clicks, not just one. But thanks anyways, it's a start. this is easier than my.setting though. i'll give it a try
go to smart click and you see if u press F11(if i'm right otherwise u need to check the info button)
that in listbox1 the X cordinations are saved and in listbox2 the Y cordinations
well its clicking through a grid, so i'm just doing x+25, y-12 for now. There are some points where i need certain spots saved though, but ill probably use a list or settings, whichever i find easier to manipulate
okay here is one i made that does it.

Items needed:
2 labels
combo box
2 timers

put this code underneath (Public Class Form1)
Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
    Private Declare Sub SetCursorPos Lib "User32" (ByVal x As Integer, ByVal y As Integer)

    Private Const MOUSEEVENT_LEFTDOWN = &H2
    Private Const MOUSEEVENT_LEFTUP = &H4

    Private Declare Sub mouse_event Lib "User32" (ByVal dwflags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal extrainfo As Integer)
Then on the first timer set its interval to "1" and click enabled, then add this code
Code:
Dim F2key As Boolean
        Dim f3key As Boolean
        F2key = GetAsyncKeyState(Keys.F2) ' you can change f2 to anything you want
        f3key = GetAsyncKeyState(Keys.F3) ' you can change f3 to anything you want
        If F2key = True Then
            Timer1.Enabled = True
        End If
        If f3key = True Then
            Timer1.Enabled = False
        End If
then in your next timer make sure it is "NOT" Enabled and its interval is "100" then add this code to it:
Code:
Dim MousePositionX As Integer = Cursor.Position.X
        Dim MousePositionY As Integer = Cursor.Position.Y
        Dim click As Boolean
        click = GetAsyncKeyState(Keys.LButton)
        If click = True Then
            Label1.Text = MousePositionX
            Label2.Text = MousePositionY
            ComboBox1.Items.Add(Label1.Text + "," + Label2.Text)
        Else

        End If
then the two labels show the locations and then they are saved as an item in the combo box

just turn on with hotkey and click somewhere

and im sure you can figure out the rest with using that code. it should be easy if not ill dink around with that too
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?