I am trying to write a program that when run is able to put text into another programs edit boxes - like an automated questionnaire filler outer prog. I have a few progs that I constantly enter the same text into fields over and over - can someone confirm that I need to use the Windows Hooks ICZ tute to get into the other program and WM_SETTEXT its edit boxes? Or is there another simpler way? James
Posted on 2001-01-14 00:49:00 by James
Hi James, I don't think you have to use the Hook's Tut. I think You must first get the handle of the window on which there are the edit boxes, then you must know the ID of the edit boxes (edit the exe file with Borland Workshop or another and look the ID) and send the text on it. E-mail me if you want, I can send you a prog I made which press the OK button (it's a loop until the window appear) on the dialog of the password of the LAN. It is in French because I don't know how it is on English version. Vom-bonjour:-()
Posted on 2001-01-14 05:59:00 by Vom-bonjour:-()
use FindWindow to find the window and retrieve the handle of it. then use GetDlgItem to get the handle of the editbox. (you must know the ID of the window) now you know the handle of the editbox you can use WM_SETTEXT to set your wished text.. it will look something like: invoke FindWindow, NULL, addr szWindowText invoke GetDlgItem, eax, ID_WINDOW invoke SendMessage, eax, WM_SETTEXT, 0, addr szSetText if you dont know the ID of the window, you can use the Customizer or even Icz's hook tut sample to get it.
Posted on 2001-01-14 09:41:00 by SavaGe
sorry bro, you can't aye, cause, seen when you send the message: i.e invoke FindWindow, NULL, addr szWindowText invoke GetDlgItem, eax, ID_WINDOW invoke SendMessage, eax, WM_SETTEXT, 0, addr szSetText Note, in the SendMessage call, the last parameter, 'addr szSetText', contains a pointer to a location in memory. Seen your app is running in Win32, the pointer is only valid in the context of your process, if the edit control is in another app, the pointer will contain the same value, but wont point to anything, i.e cause a page fault on access.
Posted on 2001-01-15 01:31:00 by manimal
Hi, Now I 've modified the Hook tuts by Icz and I can get the ID of controls so, if you want me to send it to you, mail me. And I've also made a prog which can set text or enable or disable a control, or press a button... Vom-bonjour:-() PS:The progs are not all finished but there are the main procs.
Posted on 2001-01-15 04:10:00 by Vom-bonjour:-()
manimal, i didnt test it when i posted my little piece of code, but after i read your reply i compiled it and ran my executable and it works fine here.. (running win2k) I used it on mIRC's registration box. also this is a really good tool (freeware) for getting properties of windows: http://www.greatis.com/windowse.htm or the customizer (shareware) is also a good tool for changing properties of a window but i forgot the url.
Posted on 2001-01-15 17:53:00 by SavaGe
Hi everybody, After all the messages, I decided to make a useful prog. It has been done now. In a few days it will be posted on the Iczelion Site.(i've just send it to him). It uses the mousehook (I thank Iczelion for his tut). You can change the Caption of a control and enable or disable a control. Vom-bonjour:-() <--------------THE ASM_32 FRENCH PROGRAMMER-------------->
Posted on 2001-01-15 22:03:00 by Vom-bonjour:-()