Hi. Sen.keys error. Please help me. does not work in metin2 .
FORM
PHP Code:
Public Class Form1
Dim Komut As New AutoItX3Lib.AutoItX3
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Interval = Val(TextBox2.Text) * 200
Label1.ForeColor = Color.Green
Label1.Text = "ACIK"
Timer1.Enabled = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Enabled = False
Label1.ForeColor = Color.Red
Label1.Text = "KAPALI"
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Timer2.Interval = Val(TextBox3.Text) * 200
Label2.ForeColor = Color.Green
Label2.Text = "ACIK"
Timer2.Enabled = True
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Timer3.Enabled = True
Timer3.Interval = Val(TextBox5.Text) * 200
Label3.ForeColor = Color.Green
Label3.Text = "ACIK"
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Timer4.Enabled = True
Timer4.Interval = Val(TextBox7.Text) * 200
Label4.ForeColor = Color.Green
Label4.Text = "ACIK"
End Sub
Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
Timer6.Enabled = True
Timer6.Interval = Val(TextBox11.Text) * 200
Label6.ForeColor = Color.Green
Label6.Text = "ACIK"
End Sub
Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
Timer7.Enabled = True
Timer7.Interval = Val(TextBox13.Text) * 200
Label7.ForeColor = Color.Green
Label7.Text = "ACIK"
End Sub
Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click
Timer8.Enabled = True
Timer8.Interval = Val(TextBox15.Text) * 200
Label8.ForeColor = Color.Green
Label8.Text = "ACIK"
End Sub
Private Sub Button18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button18.Click
Timer9.Enabled = True
Timer9.Interval = Val(TextBox17.Text) * 200
Label9.ForeColor = Color.Green
Label9.Text = "ACIK"
End Sub
Private Sub Button20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button20.Click
Timer10.Enabled = True
Timer10.Interval = Val(TextBox19.Text) * 200
Label32.ForeColor = Color.Green
Label32.Text = "ACIK"
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
Timer5.Enabled = True
Timer5.Interval = Val(TextBox9.Text) * 200
Label5.ForeColor = Color.Green
Label5.Text = "ACIK"
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Timer2.Enabled = False
Label2.ForeColor = Color.Red
Label2.Text = "KAPALI"
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Timer3.Enabled = False
Label3.ForeColor = Color.Red
Label3.Text = "KAPALI"
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Timer4.Enabled = False
Label4.ForeColor = Color.Red
Label4.Text = "KAPALI"
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
Timer5.Enabled = False
Label5.ForeColor = Color.Red
Label5.Text = "KAPALI"
End Sub
Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
Timer6.Enabled = False
Label6.ForeColor = Color.Red
Label6.Text = "KAPALI"
End Sub
Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
Timer7.Enabled = False
Label7.ForeColor = Color.Red
Label7.Text = "KAPALI"
End Sub
Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
Timer8.Enabled = False
Label8.ForeColor = Color.Red
Label8.Text = "KAPALI"
End Sub
Private Sub Button17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button17.Click
Timer9.Enabled = False
Label9.ForeColor = Color.Red
Label9.Text = "KAPALI"
End Sub
Private Sub Button19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button19.Click
Timer10.Enabled = False
Label32.ForeColor = Color.Red
Label32.Text = "KAPALI"
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
SendKeys.Send(TextBox1.Text)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fileExists As Boolean
fileExists = My.Computer.FileSystem.FileExists("AutoItX3.dll")
If fileExists = False Then
MsgBox("AutoItX3.dll Bulunamadı ! ,Bazı programlar doğru çalışmayablir !!!")
End If
If fileExists = True Then
Call Register(CurDir() & "\AutoItX3.dll")
End If
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
SendKeys.Send(TextBox4.Text)
End Sub
Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
SendKeys.Send(TextBox6.Text)
End Sub
Private Sub Timer4_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer4.Tick
SendKeys.Send(TextBox8.Text)
End Sub
Private Sub Timer5_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer5.Tick
SendKeys.Send(TextBox10.Text)
End Sub
Private Sub Timer6_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer6.Tick
SendKeys.Send(TextBox12.Text)
End Sub
Private Sub Timer7_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer7.Tick
SendKeys.Send(TextBox14.Text)
End Sub
Private Sub Timer8_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer8.Tick
SendKeys.Send(TextBox16.Text)
End Sub
Private Sub Timer9_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer9.Tick
SendKeys.Send(TextBox18.Text)
End Sub
Private Sub Timer10_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer10.Tick
SendKeys.Send(TextBox20.Text)
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
Process.Start("http://libermetin2.host.org")
End Sub
Private Sub LinkLabel2_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked
Process.Start("http://www.facebook.com/omansakosk")
End Sub
End Class
MODULE
PHP Code:
Module Module1
Private Declare Function LoadLibraryRegister Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
Private Declare Function GetProcAddressRegister Lib "kernel32" Alias "GetProcAddress" (ByVal hModule As Long, ByVal lpProcName As String) As Long
Private Declare Function CreateThreadForRegister Lib "kernel32" Alias "CreateThread" (ByVal lpThreadAttributes As Long, ByVal dwStackSize As Long, ByVal lpStartAddress As Long, ByVal lpParameter As Long, ByVal dwCreationFlags As Long, ByVal lpThreadID As Long) As Long
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function GetExitCodeThread Lib "kernel32" (ByVal hThread As Long, ByVal lpExitCode As Long) As Long
Private Declare Sub ExitThread Lib "kernel32" (ByVal dwExitCode As Long)
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function FreeLibraryRegister Lib "kernel32" Alias "FreeLibrary" (ByVal hLibModule As Long) As Long
Dim stFileCouldNotBeLoadedIntoMemorySpace As Integer
Dim stNotAValidActiveXComponent As Integer
Dim stActiveXComponentRegistrationFailed As Integer
Dim stActiveXComponentRegistrationSuccessful As Integer
Dim stActiveXComponentUnRegisterSuccessful As Integer
Dim stActiveXComponentUnRegistrationFailed As Integer
Dim stNoFileProvided As Integer
Private Const NOERRORS As Long = 0
Private Const STATUS_WAIT_0 = &H0
Private Const WAIT_OBJECT_0 = ((STATUS_WAIT_0) + 0)
Public Function Register(ByVal p_sFileName As String) As Object
Dim lLib As Long
Dim lProcAddress As Long
Dim lThreadID As Long
Dim lSuccess As Long
Dim lExitCode As Long
Dim lThreadHandle As Long
Dim lRet As Long
On Error GoTo ErrorHandler
If lRet = NOERRORS Then
If p_sFileName = "" Then
lRet = stNoFileProvided
End If
End If
If lRet = NOERRORS Then
lLib = LoadLibraryRegister(p_sFileName)
If lLib = 0 Then
lRet = stFileCouldNotBeLoadedIntoMemorySpace
End If
End If
If lRet = NOERRORS Then
lProcAddress = GetProcAddressRegister(lLib, "DllRegisterServer")
If lProcAddress = 0 Then
lRet = stNotAValidActiveXComponent
Else
lThreadHandle = CreateThreadForRegister(0, 0, lProcAddress, 0, 0, lThreadID)
If lThreadHandle <> 0 Then
lSuccess = (WaitForSingleObject(lThreadHandle, 10000) = WAIT_OBJECT_0)
If lSuccess = 0 Then
Call GetExitCodeThread(lThreadHandle, lExitCode)
Call ExitThread(lExitCode)
lRet = stActiveXComponentRegistrationFailed
Else
lRet = stActiveXComponentRegistrationSuccessful
End If
End If
End If
End If
ExitRoutine:
Register = lRet
If lThreadHandle <> 0 Then
Call CloseHandle(lThreadHandle)
End If
If lLib <> 0 Then
Call FreeLibraryRegister(lLib)
End If
Exit Function
ErrorHandler:
lRet = Err.Number
GoTo ExitRoutine
End Function
End Module
I think no one will help you, if you just copy your whole code because no one wants to read it..just tell us what is not working and add only the code which is needed for SendKeys, not some thread registration blabla..
Sorry, but your Code looks like Copy&Paste-**** with some "newbie"-changes. I think, that you should learn the language (vb.net) first. Furthermore you can do all AutoIt-Things in vb.net without this AutoItX3.dll (not performant + buggy), if you know how.
send error ! 01/24/2011 - Last Chaos - 3 Replies hallo liebe com
ich habe seid einigen tagen das problem auf 777 lc das wenn ich kapelle rein porte und ein mob anhitte direkt nach dem 1tens chlag send errror bekomme manchmal geschiet dies AUCh direkt nach dem port hinein . passiert dies nicht und ich mal keller möchte . passiert es dort auch des öfteren .
weiss jemand eine lösung :)
Send error 12/15/2010 - Last Chaos - 5 Replies hi leute, wenn ich lastchaos normal/mit dem hack von wurstebrot starte kommt sofort send error?seit heute mittag, kann jmnd helfen?