mIRC Home    About    Download    Register    News    Help

Print Thread
#72989 27/02/04 11:24 PM
Joined: Feb 2004
Posts: 2
D
Doug Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
D
Joined: Feb 2004
Posts: 2
Hiya, I'm trying to use a C++ app to read the text in an open channel (i.e the channel window is open and Restored or maximized). I can get the HWND of the channel window, but neither GetWindowText or SendMessage( , WM_GETTEXT, ...) work (they both return the window caption). Does anyone know a way to access the stored text?

(I realise that this many have already been answered, somewhere, but I haven't seen it)

Last edited by Doug; 27/02/04 11:31 PM.
#72990 28/02/04 01:31 AM
Joined: Jun 2003
Posts: 195
N
Vogon poet
Offline
Vogon poet
N
Joined: Jun 2003
Posts: 195
Thats because GetWindowText retrieves the caption for windows that are overlapped (and include the WS_CAPTION style). The actual test is stored internally by mIRC and cant be accessed directly that i know of.

You can use SendMessage and some script (namely $lines etc..) to retrieve the text. It would of course be faster if you could access mIRC's internal buffer but for now at least it works.


Have Fun smile
#72991 28/02/04 11:19 AM
Joined: Feb 2004
Posts: 2
D
Doug Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
D
Joined: Feb 2004
Posts: 2
erm, how, exactly? Lines'll get the data, but I can't get it out of the program

#72992 28/02/04 11:24 AM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
By using SendMessage( hWnd, WM_MEVALUATE, 0, 0) with a mapped file containing the line to evaluate. See /help SendMessage for the details.


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard