Notice When Window Being Created of Other Thread or Process

Welcome Forums General PowerShell Q&A Notice When Window Being Created of Other Thread or Process

Viewing 1 reply thread
  • Author
    Posts
    • #230071
      Participant
      Topics: 3
      Replies: 1
      Points: 15
      Rank: Member

      Is there a way to get a notice when there is a window which has just been load and going to be created (e.g. after clicking a button) within other thread or process? I want to use it in Automation for some UI rather than using Start-Sleep for specific seconds/minutes and even not sure that if the loading is fail!

      I tried SetWinEventsHook and SetWindowsHookEx API but boh does not work and seems only can run in a Form Class.

      I also tried receiving WMI message and succeed to get notice when the process is fully run but not “window being created’.

      FindWindow and EnumWindows are also not working because those API can only find the window when it is client-ready but not “window being created’.

      Any advise?

      • This topic was modified 6 months, 2 weeks ago by richard090762.
    • #230386
      Participant
      Topics: 17
      Replies: 1872
      Points: 3,640
      Helping Hand
      Rank: Community Hero

      Is there a way to get a notice when there is a window which has just been load and going to be created (e.g. after clicking a button) within other thread or process?

      This is very vague. There is form class and windows, so is this a .NET Form being generated from Powershell? You are opening child windows with a button click and want to see if something is being completed in the child window? This question seems like a .NET question rather than a Powershell question. Have you tried to search for .NET forums on monitoring child windows?

Viewing 1 reply thread
  • The topic ‘Notice When Window Being Created of Other Thread or Process’ is closed to new replies.