Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Getting Window Title

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,1861
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Getting Window Title
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Getting Window Title - 1/18/2005 9:50:03 PM   
  bexleydurden

 

Posts: 1
Score: 0
Joined: 1/18/2005
From:
Status: offline
Is there a quick and easy method of reading the active window title??

I know I can do this in VB with API's but what about vbs??

Any suggestions kind folks??
 
 
Post #: 1
 
 Re: Getting Window Title - 1/18/2005 11:30:23 PM   
  drbelden

 

Posts: 109
Score: 0
Joined: 12/21/2004
From: USA
Status: offline
I don't know of any quick way to find this for an existing process, but I did see this on the web which uses tlist.exe (tasklist.exe in XP).
http://www.codecomments.com/archive299-2004-7-243741.html

(in reply to bexleydurden)
 
 
Post #: 2
 
 Re: Getting Window Title - 1/19/2005 12:53:04 AM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
I do not know how this can be done with vbscript, but it can be done with AutoIT, www.hiddensoft.com, this can be compiled into an exe which can then be run from a vbscript.

(in reply to bexleydurden)
 
 
Post #: 3
 
 Re: Getting Window Title - 1/19/2005 1:45:52 AM   
  tnoonan

 

Posts: 364
Score: 0
Joined: 12/14/2004
From:
Status: offline
Function GetOpenWindowTitles(vTitles As Variant)
Õ Get a list of open, visible "top-level" windows by title bar text.
This function can be used to get title needed for CloseProgram sub.
ex.: r = sys.GetOpenWindowTitles(a)

vTitles returns an array of window titles. If method fails,
or if there are no open windows, vTitles returns "".

Return:
Function return is number of window titles listed in array vTitles.
A window is listed only if it is visible so that the window list will
actually represent open programs and Explorer windows on the
Desktop. (A minimized window is visible).
Possibly useful note: The list returned seems to always contain
"Program Manager" (ProgMan).

A return of -1 indicates that function failed.
A return of 0 indicates no open windows.

http://www.jsware.net/jsware/scripts.html

Download jssys3.zip (115 KB)

(in reply to bexleydurden)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Getting Window Title Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts