Hey guys, I've made a simple program to send a keystroke to WoW for automated DE/Milling/Prospecting for myself and to post here for others.
Right now I have
Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Private Const EM_REPLACESEL = &HC2
Code:
sproc = System.Diagnostics.Process.GetProcessById(CB1.SelectedItem)
SendString = StrokeTB.Text
WowHwnd = sproc.MainWindowHandle
Code:
ret = SendMessage(WowHwnd, EM_REPLACESEL, 0&, SendString)
I know the process ID is correct, not sure if the parameters are incorrect or if I'm grabbing the wrong handle. Running it works but nothing happens in-game then the stack becomes unbalanced.
Any ideas? I'm not huge into coding but I have a basic grasp of it. I know I should at least be using C++ but I've never learned it well enough to try to do this.
If this is a dumb question then let me know and I'll just delete thread =3
Edit: V 5.1.0 (16357)
Also not sure if I should move this to Bots Questions forum since this technically isn't memory reading/writing, if anyone thinks that I should move it lemme know and I will.
Thanks in advance.