WinGetActive Not Getting Active Window
Keywords: WinGetActive()
Question:
The program can be seen by WinItemize(). WinInfo doesn´t show any title as well.
- I open a program called "PCphone" and put it in the background.
- I run:
WinActivate("PCphone Pro") Delay(2) Name = WinGetActive() Message("", Name)- The progam comes to the foreground :-)
- The messagebox is empty - Name == "" :-((
The focus is on the button I used recently. There is no window to type in, but I can use keystrokes to press buttons - this works.
Note: PCphone seems to be written in VB and has at least parts written in VB2. Problems with that? Thank you for any hints.
Answer:
I suspect there is a blank named Window someplace. After WinActivate where is the window "focus" - what window gets keystrokes if you start typing.WinBatch has a hard time "seeing" blank-named windows. Using the "Control Manager" extender - downloadable from our download area - you can see windows better - with lots more code.
Article ID: W13376Filename: Use WinGetActive to Get Active Window.txt