> 
> Is visiblewindow(capti) equal to win.visible(win.handle(capti))?

Yes.


> I want to close the window in both cases,
> and dont wanna do this by using HookWindowEvents.
> _____________________________________
> Life in Windows without pp is black & white.
>
I am not sure if wait.until is what you want; it means
wait.until(max_wait_in_milliseconds, wait_for_expr)
and it stops waiting whenever the milliseconds elapse or the expr becomes true.

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



Reply via email to