WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Window Manipulation

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

WinGetActive Not Getting Active Window

Keywords:   WinGetActive()

Question:

  1. I open a program called "PCphone" and put it in the background.

  2. I run:
       WinActivate("PCphone Pro")
       Delay(2)
       Name = WinGetActive()
       Message("", Name)
    
  3. The progam comes to the foreground :-)

  4. The messagebox is empty - Name == "" :-((
The program can be seen by WinItemize(). WinInfo doesn´t show any title as well.

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:   W13376
Filename:   Use WinGetActive to Get Active Window.txt
File Created: 1999:04:15:16:53:36
Last Updated: 1999:04:15:16:53:36