1 Reply Latest reply on Jul 24, 2007 8:32 PM by Newsgroup_User

    Test if a window is open

    wgb14 Level 1
      Hi all

      is there any way to test if a window is open and then do something and if not something else?

      Thanks
        • 1. Re: Test if a window is open
          Level 7
          > is there any way to test if a window is open and then do something and if not something else?

          What do you mean by a "window"?

          If you are referring to a Movie In A Window (MIAW), you can use:
          bExists = _player.windowPresent("windowName")
          if bExists then
          -- code here
          else
          -- code here
          end if
          The windowPresent function will only tell you if a named window exists
          in the windowList.
          If you want to know whether a window is open or closed, you can use:
          bExists = _player.windowPresent("windowName")
          if bExists then
          bOpen = window("windowName").visible
          if bOpen then
          -- ...
          else
          -- ...
          end if
          end if

          If you are referring to a window owned by another application, there are
          xtras that can locate these and return handles.