check if a window name exist 
Author Message
 check if a window name exist

Is there a (built-in) method to check whether a visible window name
exists?

This question has been asked before but I am away from my archive
of messages in this newsgroup.



Tue, 28 Jan 2003 03:00:00 GMT  
 check if a window name exist

You can try a trick and use AppActivate:

Set oWshShell = CreateObject("WScript.Shell")
tmp = oWshShell.AppActivate ("Windows Title")

If tmp is true, the window exists and is in foreground.
It is also possible to get a list of running processes using
WMI. Or you can use an ActiveX control WSHExtend.ocx
downloadable from my WSH Bazaar (which provides a
FindWindow method).

I guess there are a couple of other tricks around (for instance
you can use the Windows-Shell to enumerate Windows).

G. Born

--
____________________________
Check out the WSH Bazaar at:
www.borncity.com



Quote:
> Is there a (built-in) method to check whether a visible window name
> exists?

> This question has been asked before but I am away from my archive
> of messages in this newsgroup.



Tue, 28 Jan 2003 03:00:00 GMT  
 check if a window name exist
I checked and found that AppActivate may not return True (-1)
but a numeric value (0,1). I always mixed it up with C.

Anyway, thank you. I now got the cdkey on my diablo2 back.
The ink of a few characters on the label was scratched off!

Quote:
> You can try a trick and use AppActivate:

> Set oWshShell = CreateObject("WScript.Shell")
> tmp = oWshShell.AppActivate ("Windows Title")

> If tmp is true, the window exists and is in foreground.
> It is also possible to get a list of running processes using
> WMI. Or you can use an ActiveX control WSHExtend.ocx
> downloadable from my WSH Bazaar (which provides a
> FindWindow method).



Fri, 31 Jan 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. check if SQL Database name already exist vbs

2. How to check if a window still exists?

3. How to check if a window still exists?

4. Checking to see if opener window exists

5. Check if a window exists...

6. name an already existing window?

7. window.open(): Cannot re-use existing window on IE5 on Mac

8. Using File Exists on Windows Explorer and Windows Media player shortcuts

9. How to check exist file?

10. check if file exist?

11. Checking to see if object exists using JavaScript

12. Check if File Exists?

 

 
Powered by phpBB® Forum Software