Macro IF Path Finder window is Open

So I have a Macro that activates Path Finder if its not in the front. Which is easy enough. If I have a PF window open it brings that to the front. However, if I don't have any PF window open it just activates Path Finder.

Is there any way I can have KM determine if Path Finder has a window open so if one isn't open it opens one or if there is a window open even if its not in the front it brings that to the front.

See this KM Function: WINDOWCOUNT function.