Re: watch for a pop-up window



Mike Brearley wrote:
I need to write a script that will watch for a pop-up window from another application and then perform certain tasks. The only part I'm stuck on is knowing when the window has popped up. Any help pointing me in the right direction would be appreciated.


Mike, use appactivate -- AS A FUNCTION. It will return
true if/when it finds your popup window.

Start by writing yourself a loop, with sleep and then
appactiveate (with the titlebar caption as its parameter).
While the popup has not yet appeared, appactivate will
be returning False. When the popup appears, then
appactivate (should) return true. When you get true
jump out of the wait loop and continue.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)
.



Relevant Pages

  • Re: WinPopupMenu using WinCreateWindow + WC_MENU
    ... The popup, doesn't stay, it just goes away right away. ... fact maybe I never had a creation problem but the thing was so fast I ... an infinite loop, but there is no popup. ... But I'd recommend just letting the window procedure return after popping up the menu and processing WM_COMMAND to dismiss the menu in a separate call to your window procedure. ...
    (comp.os.os2.programmer.misc)
  • Re: How to make Internet Explorer window top most?
    ... > How to place Internet Explorer on top(modal window). ... You could set a title, and use AppActivate on it, an example here: ... You should add an "WScript.Sleep 100 in this loop to avoid CPU hogging. ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windows.server.scripting)
  • Re: Accesing check boxes and clicking buttons
    ... (how can you appactivate something that isn't there) ... window has not appeared as yet, and true when the window does ... The usual strategy is to go into a loop, ... I could use Java's Robot ...
    (microsoft.public.scripting.vbscript)
  • Re: Iceweasel freezes and iceape vulnerabilities and instability
    ... popup is fixed in place within the browser window, ... the browser is doing its job; it is just possible to do some really ... Funny you mention this -- I don't think this is due to malicious code, ...
    (Debian-User)
  • RE: [PHP] Conditional popup driven from server-side
    ... otherwise display normal browser page. ... if there aren't errors then popup a modal ... window and start processing while displaying ... server, and then get the server to close it when done. ...
    (php.general)