|
You last visited: Today at 14:51
Advertisement
VB Problem (Mouse Recorder)
Discussion on VB Problem (Mouse Recorder) within the .NET Languages forum part of the Coders Den category.
10/10/2011, 01:45
|
#1
|
elite*gold: 0
Join Date: Sep 2007
Posts: 27
Received Thanks: 6
|
VB Problem (Mouse Recorder)
Hallo Community!
Ich bin en Frischling was VB angeht und versuche nun einen Autoclicker zu programmieren. Dieser soll natürlich das Mouse-Movement, die Klicks aufzeichnen und zusätzlich die Funktionen haben einen Delay zwischen den Loops zu setzen.
Leider habe ich irgendwie derzeit ein Brett vorm Kopf und mein Loop will einfach nicht so wie ich es möchte und läuft UNENDLICH. Freue mich also über jede Art von Tips die mir helfen !
Code:
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PlayTimer.Tick
If ListBox1.Text = "-32767" Or ListBox1.Text = "-32768" Then
mouse_event(mouseclickdown, 0, 0, 0, 0)
mouse_event(mouseclickup, 0, 0, 0, 0)
End If
If ListBox3.Text = "Left" Then
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
ElseIf ListBox3.Text = "Right" Then
mouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0)
ElseIf Not ListBox3.Text = "Left" And Not ListBox3.Text = "Right" Then
Cursor.Position = New Point(ListBox2.Text, ListBox3.Text)
End If
Try
ListBox1.SelectedIndex = ListBox2.SelectedIndex + +1
ListBox2.SelectedIndex = ListBox2.SelectedIndex + +1
ListBox3.SelectedIndex = ListBox3.SelectedIndex + +1
Catch ex As Exception
If CheckBox1.Checked Then ' comment
'PlayTimer.Stop()
For i = 1 To CInt(TextBox2.Text)
If i < CInt(TextBox2.Text) Then
delay(TextBox1.Text)
ListBox2.SelectedIndex = 0
ListBox3.SelectedIndex = 0
PlayTimer.Start()
ElseIf i >= CInt(TextBox2.Text) Then
PlayTimer.Stop()
End If
Next i
End If
End Try
End Sub
Textbox 1 = Anzahl der Schleifen
Textbox 2 = Zeit bis Neustart
Checkbox 1 = Schleifen aktivieren
|
|
|
10/10/2011, 06:24
|
#2
|
elite*gold: 5
Join Date: Aug 2008
Posts: 146
Received Thanks: 19
|
Mal ne Frage dir ist klar das du das Progamm textbox1 s wartenlässt und textbox 2 mal durchlaufen lässt. Zudem i kann nicht größer werden als der inhalt von textbox2
Aber natürlich noch keine Problemlösung.
Wie groß hast du den das Interval beim timer gesetzt?
Bist du dir auch sicher das dein programm im ex bereich kommt?
|
|
|
10/10/2011, 07:47
|
#3
|
elite*gold: 0
Join Date: Sep 2007
Posts: 27
Received Thanks: 6
|
Code:
Public Class Form1
#Region "DIMS"
Dim result As Integer
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Short
Dim curclicks = 0
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)
Private Const MOUSEEVENTF_ABSOLUTE = &H8000 ' absolute move
Private Const MOUSEEVENTF_LEFTDOWN = &H2 ' left button down
Private Const MOUSEEVENTF_LEFTUP = &H4 ' left button up
Private Const MOUSEEVENTF_MOVE = &H1 ' mouse move
Private Const MOUSEEVENTF_MIDDLEDOWN = &H20
Private Const MOUSEEVENTF_MIDDLEUP = &H40
Private Const MOUSEEVENTF_RIGHTDOWN = &H8
Private Const MOUSEEVENTF_RIGHTUP = &H10
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
#End Region
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RecorderTimer.Tick
Dim Mouse As Point = Control.MousePosition
If GetAsyncKeyState(MOUSEEVENTF_LEFTDOWN) Then
ListBox2.Items.Add("Left")
ListBox3.Items.Add("Right")
ElseIf GetAsyncKeyState(MOUSEEVENTF_RIGHTDOWN) Then
ListBox2.Items.Add("Right")
ListBox3.Items.Add("Right")
Else
ListBox2.Items.Add(Mouse.X)
ListBox3.Items.Add(Mouse.Y)
End If
ListBox1.Items.Add(GetAsyncKeyState(1))
End Sub
Private Sub delay(ByVal zeit As Integer)
Dim zeit1 As Integer = System.Environment.TickCount
While (System.Environment.TickCount - zeit1) < zeit
Application.DoEvents()
End While
End Sub
Private Sub looper()
Dim schleife As Integer = CInt(TextBox2.Text)
If CheckBox1.Checked = True Then
For i As Integer = 1 To schleife
If i <= schleife Then
restart()
ElseIf i > schleife Then
MsgBox("Done ! ... max loops reached")
End If
Next i
ElseIf CheckBox1.Checked = False Then
MsgBox("Done ! ... no loop activated")
End If
End Sub
Private Sub restart()
ListBox2.SelectedIndex = 0
ListBox3.SelectedIndex = 0
delay(3000)
MsgBox("New Start")
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PlayTimer.Tick
If ListBox1.Text = "-32767" Or ListBox1.Text = "-32768" Then
mouse_event(mouseclickdown, 0, 0, 0, 0)
mouse_event(mouseclickup, 0, 0, 0, 0)
End If
If ListBox3.Text = "Left" Then
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
ElseIf ListBox3.Text = "Right" Then
mouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0)
ElseIf Not ListBox3.Text = "Left" And Not ListBox3.Text = "Right" Then
Cursor.Position = New Point(ListBox2.Text, ListBox3.Text)
End If
Try
ListBox1.SelectedIndex = ListBox2.SelectedIndex + +1
ListBox2.SelectedIndex = ListBox2.SelectedIndex + +1
ListBox3.SelectedIndex = ListBox3.SelectedIndex + +1
Catch ex As Exception
PlayTimer.Stop()
looper()
End Try
End Sub
Also irgendwie ist der Wurm drin, desshalb hier noch einmal der "komplette" neue Code.
Eigentlich soll er folgendes tun:
1. ich zeichne etwas auf
2. Programm wird gestartet durch den Button -> PlayTimer.Start()
3. Nachdem er die erste Aufnahme abgespielt hat startet der "looper" nd falls Schleifen gewünscht sind soll alles von Vorne anfangen nach einem DELAY
... wenn ich wie hier im Code MsgBox("New Start") einfüge verhällt sich das Programm genau so wie ich es haben möchte
... füge ich allerdings PlayTimer.Start() an diese Stelle ein, um die Aufzeichnung erneut zu starten, wird es eine ENDLOSSCHLEIFE !!!
|
|
|
 |
Similar Threads
|
[AFK Tool] S4 Bot! -Mouse Recorder!
01/23/2013 - S4 League Hacks, Bots, Cheats & Exploits - 32 Replies
http://www.filetransit.com/images/screen/5b383afcf 2c16873a827d35af84244d7_Axife_Mouse_Recorder_Demo. gif
What is this?:
Well, this is a little tool that record all your moves in S4 League, including clicks.
Works like an AFK Tool including attakcs. =O
PS: Sorry for my bad english :o
How to use it?:
°Well, first at all, you must open it with this "Undetect Tool by zZcarlosZz" (You can find this in the folder) if you dont wanna get banned...
|
[Request]Mouse Recorder
02/10/2010 - Grand Chase - 4 Replies
i would like to request for a working mouse recorder for GCPH....if theres one existing
Thanks
|
Nid a Tut for Mouse and Keyboard recorder
02/04/2010 - Grand Chase Hacks, Bots, Cheats & Exploits - 6 Replies
Well..
ima kinda having trouble playing a recorded macro...
after I record... my GC doesnt play from teh macro i recorded..
nid help~ plox~
if u guys dont mind~
|
[REQUEST]Mouse Recorder
11/30/2009 - Grand Chase Philippines - 6 Replies
Meron po ba kayong Mouse Recorder dyan na pedeng ipang record sa GC??
Effective po kasi yun. Pede ka po magrecord sa dungeon para Fragment sa 2nd Job Quest.
At isa pa Effective rin po to para sa mga TAMAD na tulad ko :p kahit sino nga po eh tatamarin sa 2nd Job Quest eh.
Meron po akong Axife Mouse Recorder kaso pagtapos ko pong magrecord nung na click ko na yung play pagpunta nung Mouse sa GC window biglang TUMITIGIL!
Please post po kayo nang MATINONG Mouse...
|
Mouse/Keyboard Recorder
04/12/2008 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 8 Replies
Description:
Hey if some of you people out there who wanted to create small bots for internet or games. Then all you need is a mouse/keyboard recorder. And I checked like over like 7-9 different ones. And the best one I found was called "JitBit Macro Recorder".
Where to Get: I think it costs like $40.00. You can get it for free through torrents or rapidshare. Its like couple migabytes so i would recommend the a rapidshare site. Just go to google and type in: jitbit macro recorder...
|
All times are GMT +1. The time now is 14:51.
|
|