Mouse Recorder help

Discussion in 'Programming General' started by kharg0, Feb 6, 2008.

Mouse Recorder help
  1. Unread #1 - Feb 6, 2008 at 4:44 PM
  2. kharg0
    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0

    kharg0 Active Member

    Mouse Recorder help

    i have made a program that records mouse movement but im stuck at replaying i have
    Code:
    Public Class Form1
        Dim X As String
        Dim Y As String
    
        Private Sub Hotkey_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hotkey.Tick
            X = MousePosition.X
            Y = MousePosition.Y
            TextBox1.Text = X
            TextBox2.Text = Y
        End Sub
    
        Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
            ListBox1.Items.Add(TextBox1.Text)
            ListBox1.Items.Add(TextBox2.Text)
        End Sub
    
        Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
            Hotkey.Enabled = True
        End Sub
    
        Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox2.Click
            Hotkey.Enabled = False
        End Sub
    
        Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox3.Click
            Playtime.Enabled = True
        End Sub
    
        Private Sub Playtime_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Playtime.Tick
            TextBox1.Text = ListBox1.Items.ToString
            ListBox1.Items.Remove(ListBox1.TopIndex)
            'Need help here what i have is mouseposition.y = textbox1.text
        End Sub
    End Class
    thats the whole code it records mouse movements into a listbox..
    it uses the listbox item to change mouse position..
    Code:
    'Need help here what i have is mouseposition.y = textbox1.text
    thats to change the mouse posistion according to the text...
    is says,... expression is a value and therefore cannot be a target of assignment.

    what should i cange my code to???

    thanks in advance kharg0

    OK update
    Code:
    TX = TextBox1.Text
            TY = TextBox2.Text
            TextBox1.Text = ListBox1.Items.ToString
            TextBox2.Text = listbox2.items.tostring
            MousePosition.X.Equals(TX)
            MousePosition.Y.Equals(TY)
            ListBox1.Items.Remove(ListBox1.TopIndex)
            ListBox2.Items.Remove(ListBox2.TopIndex)
    but y doesnt that work????? when i press play nothing happens


    HEY Guys thanks for the help really appreciate... heres my code
    Code:
    Declare Function SetCursorPos& Lib "user32" (ByVal X As Long, ByVal Y As Long)
    declare that
    Code:
    TX = TextBox1.Text
            TY = TextBox2.Text
            TextBox1.Text = ListBox1.Text
            TextBox2.Text = ListBox2.Text
            SetCursorPos(TX, TY)
    then add that 2 a timer but still more problems...
    Code:
    TextBox1.Text = ListBox1.Text
            TextBox2.Text = ListBox2.Text
    ??
    i need the text box text to be the top item on listbox
     
< human mouse? | Someone help me please =( >

Users viewing this thread
1 guest


 
 
Adblock breaks this site