Buenas me gustaria que el interval de mi autoclick fuera picosegundo mi codigo es este:
Public Class Form1
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)
Private Const mouseclickup = 4
Private Const mouseclickdown = 2
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
'En el Timer1 ponemos:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Windows.Forms.Cursor.Position = New Point(Windows.Forms.Cursor.Position.X, Windows.Forms.Cursor.Position.Y)
Timer1.Interval = NumericUpDown1.Value
Label1.Text = Windows.Forms.Cursor.Position.X
Label2.Text = Windows.Forms.Cursor.Position.Y
Windows.Forms.Cursor.Position = New Point(TextBox1.Text, TextBox2.Text)
mouse_event(mouseclickdown, 0, 0, 0, 0)
mouse_event(mouseclickup, 0, 0, 0, 0)
Windows.Forms.Cursor.Position = New Point(Label1.Text, Label2.Text)
End Sub
'En el Timer2 ponemos:
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Dim hotkey As Boolean
hotkey = GetAsyncKeyState(Keys.F9)
If hotkey = True Then timer1.start()
Dim hotkey1 As Boolean
hotkey1 = GetAsyncKeyState(Keys.F10)
If hotkey1 = True Then Timer1.Stop()
End Sub
'En el Timer3 ponemos:
Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
Dim Posicion As Boolean
Posicion = GetAsyncKeyState(Keys.F7)
If Posicion = True Then
TextBox1.Text = MousePosition.X : TextBox2.Text = MousePosition.Y
End If
If Posicion = False Then
End if
End Sub
End Class
el código sería sencillo.....
Imports System.Timers
Dim nPicoSeg As Integer = 5
Dim tim1 As Timer = New Timer(nPicoSeg * 10 ^ (-9))
pero si no me equivoco..... para tener un timer en picosegundos necesitarías un procesador en terahercios..... :rolleyes:
:-X esque quiero saber como utilisar autazo
Cita de: cabrera987 en 4 Enero 2014, 22:18 PM:-X esque quiero saber como utilisar autazo
Auta que?
(http://img10.imageshack.us/img10/1466/xioz.png)
xD
Auto-Click (Good)
Auta(s|z)o (WTF!)Porfavor, gente latina, no sigan destrozando el significado común de cualquier palabra, así como del Castellano. :¬¬