Forum Discussion

ChrisPro's avatar
ChrisPro
Contributor
12 years ago

Display at a time T an application in the foreground

Here is my problem.



An application is launched, but I don't know where it is, that is to say, whether it is in the Windows Systray or visible behind my current window.



What is the procedure in JScript to do to ensure that it appears at a time T in the foreground, not knowing if it is in the Systay Windows or visible behind my current window?



Thank you.

2 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor
    I'm not sure I understood your problem...

    but you can use  (Sys.WaitProcess("MyProcess", 1000).Exists) to check whether process is running for 1000 mil sec.
  • karkadil's avatar
    karkadil
    Valued Contributor
    You'll need to use 3 properties: Exists, Visible and VisibleOnScreen.



    First, you verify Exists property in order to be sure that window exists (you need Wait... method to access the window).



    Then check the Visible property to make sure that window is visible.



    Finally, verify VisibleOnScreen property to make sure your window is on top.