On Mon, 10 Aug 2009 10:53:06 -0000
"brucexs" <[email protected]> wrote:
> =xxx matches the first top level window of the program. It may not be the
> one you want -- some programs use off screen windows or zero-sized windows.
> If you can specify your target window by a caption or class name, that may
> work better.
Yep. I use =takenote because there is only one window in this program.
There is just one window this program creates. In the hidden window list
there is just this main window, so only one window can be shown for
takenote.exe.
> > has the focus in it. How can I mimic this? Which is the proper command
> > to show a trayminned window? "window minrestore =takenote" doesn't show
> > the window for some reason.
> >
>
> Try window show
Window show shows the window, but unfocused. I fixed it this way:
Window - Show - =takenote, then in the "More commands" field this:
win.setfocus(win.handle("=takenote")).
It shows the window focused. No noticeable delay between showing window
and giving it focus :)
Besides. This window has two controls: a tree control and an edit
control. The user can switch between them hitting F6 and the focus is by
default in the tree control. I want it to be in the edit field. If I put
this in the "More commands" field:
win.setfocus(win.handle("=takenote"))
keys {f6} (or keys {=takenote} {f6}
something weird happens: the edit control is activated (the blinking the
cursor appears and I can write in it) but the window looks like
unfocused (grey titlebar instead of blue titlebar), and the most strange
thing of all: clicking in the window doesn't make the titlebar look like
active. It remains grey. Only can look again like normal if I click
another window and go back to this TakeNote window. It works as I want
to, but this is weird. Above all, this happens most of the times, but
not all. Very fun.
This capture shows it: blinking cursor in the window and the window
looks like not focused. But it IS active, because I did the capture with
alt + print screen and captured just this window:
http://img10.imageshack.us/img10/3020/clipboard01qcn.png
¿Could this be the same issue that causes the window not to *look* focused
after Window - Show - =takenote?
Anyway, I'm done with this I think. Thanks to Bruce and everyone who
bothered to read.
--
Rutheford E. Wayne-Smith <[email protected]>