[2008] Sending string with Sendmessage help
Hi all,
I am trying to send a string to a window that could be either active or inactive.
hwnd does match up with the same value in spy++, so I know it's getting the correct window handle.
The window is a game and does not have any child windows so I'm not sure what to do with that..I did manage to get the title to change but that's not what I want and I can't even get it to do that again. I want to send a string to that window.
Code below..
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
Dim hwnd As Int32 = FindWindow(vbNullString, "The 4th Coming")
Dim txttosend As String = "test"
SendMessage(hwnd, WM_SETTEXT, 0, txttosend)
Re: [2008] Sending string with Sendmessage help
Bump..does anyone have a solution to this seemingly easy problem?
Re: [2008] Sending string with Sendmessage help
Is the game a DirectX game? because if it is then this will not work. You may be able to get the text in using PostMessage but you will find that it does nto work exactly as desired. I personally have written many trainers and with DirectX games if you are not hooking DirectInput then you are going to have a really hard time with this.
Re: [2008] Sending string with Sendmessage help
Yes, I'm pretty sure it uses an older version of DirectX as it's an older mmorpg (7+ years)
How would I hook directinput to send a string to the game?
Re: [2008] Sending string with Sendmessage help
what game exactly? I have written quite a few applications for FFXI perhaps I can help.
Re: [2008] Sending string with Sendmessage help
Re: [2008] Sending string with Sendmessage help
oh, ha ha ha I didn't read the code in the first post
Re: [2008] Sending string with Sendmessage help
ok well I know nothing about that game but I can tell you this. If you do not know C++ and have an understanding of how to create a DX wrapper and API Hijacking then you are not going to be able to do this. Another issue you will run into even if you get text into the chat input is that sending the enter key fails. Check out this site http://www.extalia.com/forums/ there is a whole bunch of stuff on there about creating DX wrappers and making trainers.