Order: 1 Button - Mouse
~Asianism
(Death Code Team / AG Team)
Code:
Public Class Form1
Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Sub Click (ByVal x As Integer, ByVal and As Integer)
mouse_event (& H2, x, y, 0, 1)
mouse_event (& H4, x, y, 0, 1)
End Sub
Private Sub Form1_Load (sender As Object, and As EventArgs) Handles MyBase.Load
End Sub
Dim cOn As Boolean
Sub Activated ()
Dim p As Point
p = System.Windows.Forms.Cursor.Position
Click (pX, pY)
End Sub
Private Sub Button1_Click (sender As Object, and As EventArgs) Handles Button1.Click
Timer1.Start ()
End Sub
Private Sub Timer1_Tick (sender As Object, and As EventArgs) Handles Timer1.Tick
Dim F5 As Integer
Dim F4 As Integer
F5 = Keys.F5
F4 = Keys.F4
If (GetAsyncKeyState (F4)) Then
cOn = True
ElseIf (GetAsyncKeyState (F5)) Then
cOn = False
End If
If (cOn) Then
Activated()
End If
End Sub
End Class
~Asianism
(Death Code Team / AG Team)
