Will return the number of times "Publications" occurs in $WindowNames. If you don't have any other windows that include "publications" in their names (Such as "Electronic Publications"), then
If [Patterncount($WindowNames, "Publications") > 0 ]
will detect that the window is open.
You could also use Get(WindowNames) in place of $WindowNames if the only reason for this variable is to check to see if this window is open.
If [ ValueCount ( FilterValues ( $WindowNames ; "Publications" ) ) ]
Thanks Phil - worked a treat.
My method works but Raybaudi's is more robust.
I don't plan to alter my existing uses of this technique as my solutions use an extremely small number of windows, but I'd use his/her technique on future uses since with it I don't risk breaking the script if a future change to the database produces a window with an overlapping window name.