I'm trying to get notification of a new window. I need to do a check to see if certain windows exist and the react to them. I could sit in a loop with if WinExists() then If WinExists() then etc etc but this is a bit messy because the window will appear at some pont but it could be anytime. This is what I have so far but I'm not sure why it doesn't work, it's based on a mouse hook code which works fine I just changed the code for the type of hook. Any ideas? Thanks Global Const $WH_