Subject: Adım Adım Bota Doğru(Otomatik Tuşa Basma) Tue May 18, 2010 5:54 am
Yeniden Merhaba Arkadaşlar Bilerek Konu başlığını adım adım bota doğru koydum eğer çok ilgi görürse konularım işi iyice profesyonelliğe götüürüp sizinle bot yazmak istiyorum tabi bunu sizinde istemeniz gerekiyo çünki bu botu herkes kendi yazacağını düşünoyurm çünki kodları burda paylaşacağım öncelikle adım adım ilerleyeceğiz bu projede otomatik tuşa basma programı yazcaz hemen kodları yazayım içimde kalmasın herkesiz ytazabilmesi için baya uzun kod satırı yaptım çünki herkesi düşünerek yazdım herkesin yapabilmesi için:
nesnelerimiz:11 tane textbox,2button,11 tane timer nesnesi(zaman), 2tane check box şimdi programın mantığını veriyiorum programımız istediğimiz sürede istediğiimiz tuşa bascak
kodlarımız
Code:
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged If CheckBox1.Checked = True Then GroupBox1.Enabled = True ElseIf CheckBox1.Checked = False Then GroupBox1.Enabled = False End If End Sub
Private Sub CheckBox12_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox12.CheckedChanged If CheckBox12.Checked = True Then GroupBox2.Enabled = True ElseIf CheckBox12.Checked = False Then GroupBox2.Enabled = False End If End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Button1.Text = "Başlat" Then enterebas.Interval = Val(TextBox1.Text) * 1000 enterebas.Start() Button1.Text = "Durdur" ElseIf Button1.Text = "Durdur" Then enterebas.Stop() Button1.Text = "Başlat" End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles enterebas.Tick SendKeys.Send(Chr(13)) End Sub
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub CheckBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CheckBox1.KeyDown
End Sub
Private Sub Button1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Button1.KeyPress
End Sub
Private Sub Button1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Button1.KeyUp
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Button2.Text = "Başlat" Then
If TextBox11.Text <> "" Then tus1.Interval = TextBox11.Text * 1000 tus1.Start() End If If TextBox2.Text <> "" Then tus2.Interval = TextBox2.Text * 1000 tus2.Start() End If If TextBox3.Text <> "" Then tus3.Interval = TextBox3.Text * 1000 tus3.Start() End If If TextBox4.Text <> "" Then tus4.Interval = TextBox4.Text * 1000 tus4.Start() End If If TextBox5.Text <> "" Then tus5.Interval = TextBox5.Text * 1000 tus5.Start() End If If TextBox6.Text <> "" Then tus6.Interval = TextBox6.Text * 1000 tus6.Start() End If If TextBox7.Text <> "" Then tus7.Interval = TextBox7.Text * 1000 tus7.Start() End If If TextBox8.Text <> "" Then tus8.Interval = TextBox8.Text * 1000 tus8.Start() End If If TextBox9.Text <> "" Then tus9.Interval = TextBox9.Text * 1000 tus9.Start() End If If TextBox10.Text <> "" Then tus0.Interval = TextBox10.Text * 1000 tus0.Start() End If Button2.Text = "Durdur" ElseIf Button2.Text = "Durdur" Then tus0.Stop() tus1.Stop() tus2.Stop() tus3.Stop() tus4.Stop() tus5.Stop() tus6.Stop() tus7.Stop() tus8.Stop() tus9.Stop()
Button2.Text = "Başlat" End If End Sub
Private Sub tus1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tus1.Tick SendKeys.Send(Chr(49)) End Sub
Private Sub tus2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tus2.Tick SendKeys.Send(Chr(50)) End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged If IsNumeric(TextBox2.Text) = False Or Val(TextBox2.Text) < 1 Then TextBox2.Text = "" End If End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged If IsNumeric(TextBox1.Text) = False Or Val(TextBox1.Text) < 1 Then TextBox1.Text = "" End If End Sub
Private Sub TextBox5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox5.TextChanged If IsNumeric(TextBox5.Text) = False Or Val(TextBox5.Text) < 1 Then TextBox5.Text = "" End If End Sub
Private Sub TextBox9_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox9.TextChanged If IsNumeric(TextBox9.Text) = False Or Val(TextBox9.Text) < 1 Then TextBox9.Text = "" End If End Sub
Private Sub TextBox7_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox7.TextChanged If IsNumeric(TextBox7.Text) = False Or Val(TextBox7.Text) < 1 Then TextBox7.Text = "" End If End Sub
Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged If IsNumeric(TextBox3.Text) = False Or Val(TextBox3.Text) < 1 Then TextBox3.Text = "" End If End Sub
Private Sub TextBox10_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox10.TextChanged If IsNumeric(TextBox10.Text) = False Or Val(TextBox10.Text) < 1 Then TextBox10.Text = "" End If End Sub
Private Sub TextBox6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox6.TextChanged If IsNumeric(TextBox6.Text) = False Or Val(TextBox6.Text) < 1 Then TextBox6.Text = "" End If End Sub
Private Sub TextBox8_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox8.TextChanged If IsNumeric(TextBox4.Text) = False Or Val(TextBox4.Text) < 1 Then TextBox4.Text = "" End If End Sub
Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged If IsNumeric(TextBox4.Text) = False Or Val(TextBox4.Text) < 1 Then TextBox4.Text = "" End If End Sub
Private Sub TextBox11_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox11.TextChanged If IsNumeric(TextBox11.Text) = False Or Val(TextBox11.Text) < 1 Then TextBox11.Text = "" End If End Sub
Private Sub tus9_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tus9.Tick SendKeys.Send(Chr(57)) End Sub
Private Sub tus8_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tus8.Tick SendKeys.Send(Chr(56)) End Sub
Private Sub tus7_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tus7.Tick SendKeys.Send(Chr(55)) End Sub
Private Sub tus6_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tus6.Tick SendKeys.Send(Chr(54)) End Sub
Private Sub tus5_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tus5.Tick SendKeys.Send(Chr(53)) End Sub
Private Sub tus4_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tus4.Tick SendKeys.Send(Chr(52)) End Sub
Private Sub tus3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tus3.Tick SendKeys.Send(Chr(51)) End Sub
Private Sub tus0_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tus0.Tick SendKeys.Send(Chr(48)) End Sub End Class