Jump to content

Display all window titles from a given class or process?


Recommended Posts

I'm trying to use AutoIt to gather all the window titles from a given class (or process).

Local $Titles = WinGetTitle("[CLASS:IMWindowClass]", "")
MsgBox(0, "Full title read was:", $Titles)

The help for WinGetTitle states it only gets the last active window if multiple titles are found

Is there anyway I can get it to list out all window titles?

The IMWindowClass is Microsoft Lync (communicator.exe). I'm eventually putting together a GUI where I can have canned replies/messages that I can select a window (a person's name) and push a button to send the string of text into that Instant Message window. Figured if I could populate a drop-down menu with a list of people's names (titles of the IM windows), then I could go from there...

Edited by kestrel
Link to comment
Share on other sites

Here ya go...replace the CLASS

#include <Array.au3>
Dim $array[1]
$iCounter = 1
While 1
If Not WinExists ( "[CLASS:IEFrame; INSTANCE:" & $iCounter & "]" ) Then ExitLoop
ReDim $array[$iCounter]
$array[$iCounter-1] = WinGetTitle ( "[CLASS:IEFrame; INSTANCE:" & $iCounter & "]" )
$iCounter += 1
WEnd
_ArrayDisplay ( $array )
Exit
Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...