Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[VB 2005] Send Message to Console Window

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
i__h4x
Grandmaster Cheater Supreme
Reputation: 0

Joined: 09 Jun 2007
Posts: 1005
Location: i__<3's__wpe

PostPosted: Sun Apr 06, 2008 11:03 am    Post subject: [VB 2005] Send Message to Console Window Reply with quote

Im trying to Read/Write text from the Console in Medal of Honor Allied Assault.
WinSpy++

Code:
X.exe
  Console "User Console"
    Edit ""
    Button "Quit"
    Button "Clear"
    Edit "Initilization"



With the words inside the quotation marks being the windows caption, and before it the windows class name. (The names are made up, just an example)

Currently I am using this code to get the hWnd of the console:

Code:
        Dim chWnd As Integer
        chWnd = FindWindow("mohaa winconsole", vbNullString)
        Dim ehWnd As Integer
        ehWnd = FindWindowEx(chWnd, 0&, "edit", vbNullString)
        Dim rtn As Integer = SendMessage(ehWnd, WM_SETTEXT, 0, "Test")


However, that does not work to send the text to the console.


From looking at this source here of how to set text to the console/read text from console:
http://www.mpcforum.com/archive/index.php/t-84687.html (8th post down)


As far as I can see this is what they do:

Get the console hwnd:
FindWindow(vbNullString, "Mohaa Console")

Call EnumChildWindows(Consolehwnd, AddressOf EnumChildWindowProc, 0&)

If it finds the right window it converts the string to a byte array and then uses sendmessage to send it to the mohaa console, but im trying to convert this/similar to vb.net

_________________
Mes'a back!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites