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.

How to Get the Process ID for an Unknown Window Title

Keywords: 	  process id  WinProcID GetProdId

Question:

Is there a way to launch an app and then get the title of it and be pretty sure it's the app you launched? I wrote a program which launches a Dial-Up Networking connection and it waits for the "Connect to" window disappear indicating the connection is complete.

The problem is now we are rolling it out in Mexico and "Connect to" is in Spanish so I need another way to identify that box. If I launch the dial connection, is it safe to use WinGetActive right after that to get the title? Will WinGetActive return som eother window if the dial up box takes a few seconds to load from disk? Any other ways to do this?

Answer:

Ummm...

  1. Use RunShell with the GetProdId parameter

  2. then use the WinItemProcID to get a list of windows that belong to that process.

*or*

See the Process extender.


Article ID:   W14317
Filename:   Get Process ID for Unknown Window Title.txt
File Created: 2001:03:26:15:01:18
Last Updated: 2001:03:26:15:01:18