p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   VBScript (http://p2p.wrox.com/forumdisplay.php?f=77)
-   -   Name or Title (http://p2p.wrox.com/showthread.php?t=1286)

charlie3 July 5th, 2003 09:26 AM

Name or Title
 
 Where do you get the name or title for WshShell.AppActivate "Calculator" or any other application. WshShell.Run "calc" can be obtained by right clicking on the application name and checking out the properties dialog box. But where do you find the name for AppActivate?

Charlie3
charliebrowning@yahoo.com

pgtips July 8th, 2003 03:33 AM

An excellent question that, to me, demonstrates the uselessness of the AppActivate function. To dynamically find the window title or PID you surely need a WinAPI function like EnumWindows, but you can't get to WinAPI from VBS. So if you really have to do this from VBS, you need to write a COM object in a language that can use WinAPI - but then, you suddenly have the whole of WinAPI available so why would you want to limit yourself to the VBS AppActivate function? Hence - a useless function in my book.

Sorry for not much help Charlie.

charlie3 July 8th, 2003 05:00 PM

Quote:

quote:Originally posted by charlie3
  Where do you get the name or title for WshShell.AppActivate "Calculator" or any other application. WshShell.Run "calc" can be obtained by right clicking on the application name and checking out the properties dialog box. But where do you find the name for AppActivate?

Charlie3
charliebrowning@yahoo.com
:(

Charlie3
charliebrowning@yahoo.com


All times are GMT -4. The time now is 10:45 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.