Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get the message text from a net send dialog

Status
Not open for further replies.

SuaveRick

Programmer
Apr 12, 2004
142
CA
Has anyone ever done this before? I want to get the text from a net send pop-up message and put it in my own program... I have no idea if I can even do that. Maybe there is a way to screen scrape it?

Thanks!
 
Spy++ will be valuable in working through
this

1. you have to detect that you got the pop-up. force the pop-up to come up. use Spy++ to see what the details of the pop-up are so your VB program can detect it. in your VB program, install a windows hook procedure and examine the messages for the pop-up coming. alternatively, have a timer that periodically checks if the pop-up is displayed

2. using Spy++, find how the hWnd for the message is identified in the pop-up and read it using SendMessage with the pop-up/control hWnd.
 
I have a question regarding this as well. I have installed the program winspector, which is bascially the same as spy++. I can view the properties of the messenger window when it pops up, such as the memory location of the static string. But the memory location is going to be different everytime. So how do I grab the string data from the window and push it into a VB variable without opening winspector everytime and manually figuring out what it is??
 
wagnj1

absolutely the hWnd and other dynamic properties will change with each execution, however, the names/classes of the objects will always be the same. when you make API calls to go through the window list, you search for EXE names, windows title names, and object classes. using these properties, which will not change between program execution, you will be able to dynamically locate the correct objects at runtime.
 
thanks for the info. I was using winspector and noticed that the Windows Messenger Service window has a class name of 32770. How would I go about using this in VB to request data from the window with that class name??
 
thanks for the info. I was using winspector and noticed that the Windows Messenger Service window has a class name of 32770. How would I go about using this in VB to request data from the window with that class name??

You use "32770" for the classname parameter. I am doing a lot with this currently - for example, I have a program, commanding a IE session that downloads files. It looks for the Download popup, fills in the filename to save field on the popup, then clicks the save button, and waits for the Download Complete popup. Entirely done using what we've talked about in this thread.

ss4merlin - the idea wasn't to call net send, but to retrieve the info on the Net Send popup that pops up on your machine. Suppose someone somewhere on your LAN calls Net Send and it pops up on your screen, the object is to have a program read what is in the popup.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top