Well spotted, I wasn't really trying to test if win.getfocus() was
greater than one. My original Contextif was:

(win.class(win.getfocus())!="Edit" and (activewindow("c=MauiFrame") or
(win.parent(win.handle("active"))==win.handle("Ecco -*") and not
win.parent(win.handle("active"))==0)))

i.e. I am trying to hide the context bar when the application in
question (EccoPro) opens a child window (a search dialog) that would
otherwise be partly obscured by the context bar.

I have since tried as an alternative:

(win.handlelist("Find     ")=="" and (activewindow("c=MauiFrame") or
(win.parent(win.handle("active"))==win.handle("Ecco -*") and not
win.parent(win.handle("active"))==0))),

but the effect was the same: serious problems switching between
windows with context bars. Setting the bar not to auto-show gets rid
of the problem.

Also, I have tried a clean context bar with only a dummy button and
the following contextifs:

1. (win.handlelist("Find     ")=="")
2. (win.getfocus() gt 1)

both produce the interference problem if set to auto-show.

Any ideas?

> Its unclear what you have in mind, but win.getfocus() returns the
> handle to the window that has focus.
> 
> Here's a working contextif:
> 
> *Format contextif (win.exename("active")=="FIREFOX" &&
> win.maxable("active"))
> 
> Regards,
> Sheri
>


Reply via email to