I have made something similar to what Darrell described using batch files and a small utility called CMDOW. The batch file was kept in a loop, running cmdow on each loop, looking for a pre-defined window title. When cmdow returned an entry containing the window title specified the batch file continued its execution (which would send me an SMS and upload a file using FTP). It was a "dirty" way to achieve what I needed, but it was the only tools (and knowledge) I had! However, you can do something similar using almost any programming language, from scripts to executables...