Wait for access to a specific website
My goal is to have an event that fires when the website is accessed. Now, maybe through the title of the window or the text in the window. Or maybe even reading the URL.
At the moment I know FindWindow (class, title); However, all attempts to put this line of code in a loop, and the condition to exit it when the window appears, have been fruitless.
Any help would be greatly appreciated.
It's impossible. At least if I understood you correctly. Do you want to register a callback when ANY software on your computer accesses a specific site?
Imagine the browser is using SSL, there is no way to detect this by listening to traffic or anything like that.
However, if you want to be notified of all connections to a specific IP, you can use your kernel sniffing mechanisms, or even redirect all traffic to that IP to a proxy configured with iptables or similar.
On Windows there is a sniffing library called WinPCap, on Linux you can use tcpdump. Although, more information on your problem would be nice.
a source to share
Finding window titles can be problematic. I don't know how much control you have over your desktop, but you might consider creating an add-on for Firefox (or the equivalent in IE) to search for that particular site.
https://developer.mozilla.org/En/Extensions/Firefox
You might also consider setting up a simple local proxy (depending on what you are doing) that looks for that site and does some action. You have to make sure that all browsers on the machine point to this local proxy in order to get it to work correctly. See the link below for a discussion of a custom proxy:
a source to share