Shoutbox

Get Handle of Textbox from non-plus window. - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Get Handle of Textbox from non-plus window. (/showthread.php?tid=65064)

Get Handle of Textbox from non-plus window. by b0rna on 08-18-2006 at 04:43 AM

yoooooooo,

im trying to set the text field of the mobile chat window...
with some help from irc i got this function which should set the text field given the correct handle for the textbox...

this window is not recognized by Plus and no Plus functions can be used to manipulate it...only through the windows api.

Interop.Call("User32","SendMessageW", hwnd, WM_SETTEXT, 0, "xxx");

[Image: mobile.JPG]

if it helps, the text box is active when the window opens, that means the cursair is flashing and ready to be typed in.

thx.

edit: maybe this will help http://www.codeproject.com/win32/manipwindows.asp


RE: Get Handle of Textbox from non-plus window. by Dempsey on 08-18-2006 at 07:11 AM

If the cursor is active, you could just try using SendKeys sort of thing, but thats a bit messy.  An example is:  Matty's reply to hWnd of IMWindowClass chat input box

I dont think you can directly use FindWindow and FindWindowEx to retrieve the handle, as Messenger windows are all wrapped in a DirectUIHWND or something.

I *think* you can retireve it using Active Accesability, but if all want the handle for is to set the text, then it will definatley work, you can see this example in Visual Basic:  Matty's reply to Active Accessibility for incoming messages