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!

Dialog Box Monitor

Status
Not open for further replies.

JPMorgan

Programmer
Dec 10, 2001
25
US
Has anyone heard of, or written anything that will monitor a computer for a specific dialog box caption and then notify a user via e-mail or other methods?

This would provide a way of e-mailing a cell phone in the middle of the night if a computer presented a specific dialog box on screen.

Any direction that you can give would be appreciated.

 
You could only do that through VBA if the application that launched the dialog box was one that implemented VBA, such as Word, Excel, Access, Powerpoint and a few others. If you wanted to to monitor Windows' system behaviour you'd need to write a real application in a real programming language like C.

Nelviticus
 
You shouldn't be looking for dialog boxes anyway - you should be trapping the errors that throw up the warning boxes

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
My apologies for not being clearer. I have 3 different machines whose sole purpose is to monitor 3 separate lasers using software provided by the Laser Company. Should anything go wrong this third party software notifies the user, much like any other program, through the use of a dialog box.

I tried to write something in VB to monitor the computer and detect any kind of dialog box, but, NELVITICUS is correct in that VB just doesn’t have many options that I could use.

I thought that someone might know of a product that would detect dialog boxes and then execute an event: e-mail, page, etc.

I appreciate both of your contributions to this thread.
 
I think you could be mixing up VB (a full-on programming language) with VBA (a scripting language for things like Word, Excel, Access and so on).

In any case, to do what you're after you'd need to write some code that monitored Windows' event queue (terminology?), which is way beyond my experience. Best forum to ask about that kind of thing is this one:

Win API
Nelviticus
 
Or just write a simple VB code that checks the title of every open window every second or so. If you get a match, send an e-mail.

Look for the MSDN article titled

HOWTO: Get a Window's Class Name and Other Window Attributes
Last reviewed: October 10, 1997
Article ID: Q112649

It will give you a good idea where to start.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top