Hello, im learning VB, and im trying to remake Krilleres Spam'o matic into VB (it was AutoIt before) Now its iZpam ( I know.. New language = New name! ) Im adding some new stuff and so, but im having some troubles.
Heres the source of the "main" form.
Code:
Public Class Form1
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' ReadMe
System.Diagnostics.Process.Start("C:\Users\Sørensen\Documents\Visual Studio 2008\Projects\Newtry\ReadMe.txt")
End Sub
Private Sub ButtonW_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonW.Click ' Whisper Knap
AppActivate("World of Warcraft")
Do
SendKeys.Send("{Enter}")
Sleep(150)
SendKeys.Send("{/}")
Sleep(150)
SendKeys.Send("w ")
SendKeys.Send(TextBox13.Text)
Sleep(100)
SendKeys.Send(" ")
SendKeys.Send(TextBox12.Text)
SendKeys.Send("{Enter}")
Sleep(TextBox11.Text * 1000)
Loop
End Sub
Private Sub Button124_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button124.Click ' /1 /2 & /4
If RadioButton1.Checked Then ' General
AppActivate("World of Warcraft")
Do
SendKeys.Send("{Enter}")
Sleep(100)
SendKeys.Send("{/}")
Sleep(150)
SendKeys.Send("1 ")
SendKeys.Send(TextBox1.Text)
Sleep(100)
SendKeys.Send("{Enter}")
Sleep(TextBox1.Text * 1000)
Loop
End If
If RadioButton2.Checked Then ' Trade
AppActivate("World of Warcraft")
Do
SendKeys.Send("{Enter}")
Sleep(100)
SendKeys.Send("{/}")
Sleep(150)
SendKeys.Send("2 ")
SendKeys.Send(TextBox2.Text)
Sleep(100)
SendKeys.Send("{Enter}")
Sleep(TextBox1.Text * 1000)
Loop
End If
If RadioButton3.Checked Then ' LFG
AppActivate("World of Warcraft")
Do
SendKeys.Send("{Enter}")
Sleep(100)
SendKeys.Send("{/}")
Sleep(150)
SendKeys.Send("4 ")
SendKeys.Send(TextBox2.Text)
Sleep(100)
SendKeys.Send("{Enter}")
Sleep(TextBox1.Text * 1000)
Loop
End If
End Sub
Private Sub ButtonY_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonY.Click ' Yell
AppActivate("World of Warcraft")
Do
SendKeys.Send("{Enter}")
Sleep(100)
SendKeys.Send("{/}")
Sleep(150)
SendKeys.Send("y ")
SendKeys.Send(TextBox4.Text)
SendKeys.Send("{Enter}")
Sleep(TextBox3.Text * 1000)
Loop
End Sub
Private Sub ButtonE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonE.Click ' Emote
AppActivate("World of Warcraft")
Do
SendKeys.Send("{Enter}")
Sleep(150)
SendKeys.Send("{/}")
Sleep(150)
SendKeys.Send(TextBox6.Text)
SendKeys.Send("{Enter}")
Sleep(TextBox5.Text * 1000)
Loop
End Sub
Private Sub ButtonRW_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRW.Click ' Raid Warning
AppActivate("World of Warcraft")
Do
SendKeys.Send("{Enter}")
Sleep(150)
SendKeys.Send("{/}")
Sleep(150)
SendKeys.Send("rw ")
SendKeys.Send(TextBox8.Text)
SendKeys.Send("{Enter}")
Sleep(TextBox7.Text * 1000)
Loop
End Sub
Private Sub ButtonN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonN.Click ' Normal
AppActivate("World of Warcraft")
Do
SendKeys.Send("{Enter}")
SendKeys.Send(TextBox10.Text)
SendKeys.Send("{Enter}")
Sleep(TextBox9.Text * 1000)
Loop
End Sub
Private Declare Function GetAsyncKeyState Lib "User32" (ByVal vKey As Long) As Integer
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim Hotkey1 As Boolean
Hotkey1 = GetAsyncKeyState(Keys.F10)
If Hotkey1 = True Then
Me.Close()
Form2.Close()
Browser.Close()
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form2.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Browser.Show()
End Sub
End Class
Problem 1. Sometimes when i choose a spam-type it crashes with some weird errors, you have to see them because i get them in danish and errors like that is hard to translate.
Problem 2. I cant make it close with the Hotkey. Dont know whats wrong there
Problem 3. Sometimes it cant find the application "World of Warcraft" Even tho its running on my computer.
You can try it yourself here just to see.
Download Link:
Krilleres iZpam VB.rar
(Dont press the ReadMe, theres no ReadMe so a waste of time xD )
Picture:


Viruscheck:
Virustotal. MD5: f79b427bf9f6bde8c62d9390fbc37608
(First time i didnt get ANY positives. Yay!)