--- In [email protected], "Leagnus" <theyal...@...> wrote:
>
> > As I understand it, you want to wait until the window is either tray-minned 
> > or visible.    Close it in either case.  Not sure I understand if this 
> > makes sense, but following show do it.
> > 
> > local cap = "the caption"
> > wait.for(2000, win.visible(cap)||win.trayminned(cap))
> > win.close(cap) // will fail silently if neither happens after 2000 ms
> >
> Yes, I've thought this way but strange thing:
> this code is unsuccessful.
> 
> And this does what it should:
> 
> wait.until (win.trayminned("caption"),win.visible("caption"))

That surprises me, as I get an error message if I run something like the above 
(which is what I would expect, after reviewing the source code). Is the above a 
direct copy and paste?

> Window.Close("caption")
> 
> This code closes the window no matter how this window tries to stay opened 
> when it's parent software starts first.

OK, it seems the close is always running.  Note that win.trayminned only works 
on windows that PowerPro has trayminned. When PowerPro tray mins a window, it 
just minimizes it and hides it and then creates a facace tray icon which it 
looks to the system like it belongs to PowerPro; PowerPro then notifies the 
hidden, minimized window if you click on that tray icon.

> 
> If I try to use a variable instead of "caption" &#8211; window stays 
> not minned.



Whenever things seem to be acting strangely, I insert a lot of debugging 
statements to try to find out what is happening.  

You could try something like 

win.debug (time, cap, anywindow(cap),win.trayminned(cap), ;;+ win.visible(cap))

just before and just after the wait.


>


Reply via email to