Wrox Programmer Forums
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 5th, 2003, 09:26 AM
Registered User
 
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
[email protected]
Reply With Quote
  #2 (permalink)  
Old July 8th, 2003, 03:33 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

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.
Reply With Quote
  #3 (permalink)  
Old July 8th, 2003, 05:00 PM
Registered User
 
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
[email protected]
:(

Charlie3
[email protected]
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Get Order By Title ssomchai BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 April 3rd, 2008 09:13 PM
Application Title Figgis Access 9 September 25th, 2006 12:59 AM
Report Title shanib Crystal Reports 1 October 7th, 2005 02:10 PM
Problem with Title fields badgolfer HTML Code Clinic 2 July 29th, 2004 06:19 AM





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