Jump to content

Recommended Posts

Posted

Is it possible to get a list of window titles with AutoIt3?

With the Au3_Spy I've found that the visible window text of control "Shell_TrayWnd1" seems to be what I want; however, the corresponding window for that control appears to have a null title.

Any way to get a handle on all this?

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
  • Developers
Posted

Cannot find any function that does that in the Helpfile ... maybe we should ask the authors ?? :whistle:

Seriously: Is it possible to make this window active and then do a WinGetTitle("")

Then if it returns "" do a WinSetTitle to make it unique ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

This might help you with a specific window (won't help you with your list of all windows though) ...

;--------------------------------------------------------------------
;Hitman.au3 - for when you can't find a spy to do the dirty work =o)
;--------------------------------------------------------------------

;Get the user ready
   $sX = "Click [OK] here: when you have started the application" & @CRLF
   $sX = $sX & "whose form you wish to interrogate for widget names." & @CRLF & @CRLF
   $sX = $sX & "A countdown will then start, to give you time to select the first" & @CRLF
   $sX = $sX & "widget to interrogate."
   MsgBox(4096 + 64, @ScriptName, $sX) 

;Start a countdown for the user to find his target window
   ProgressOn("Quick! Find your target window","Counting down..")
   For $k = 0 to 4
       ProgressSet(100 - 20 * $k)
       Sleep(1000)
   next
   $sTitle = WinGetTitle("","")  ;whatever has focus by now
   ProgressOff()

(( The full scripted alternative (Hitman.AU3) to the Au3_Spy was aimed at working around Au3_Spy's tendency to see through tabs and report the wrong active control ))

HTH :whistle:

Posted

Is it possible to get a list of window titles with AutoIt3?

With the Au3_Spy I've found that the visible window text of control "Shell_TrayWnd1" seems to be what I want; however, the corresponding window for that control appears to have a null title.

Any way to get a handle on all this?

Jon, good example of why having the ability to interact with class names and/or handles would be nice. B):whistle:
Posted (edited)

Have you looked at the Window Spy in wintask (www.wintask.com). Its somewhat expensive software but has a very good window spy (I think) and it also has a neat, but limited tool for simply creating a GUI (with listboxes, comboboxes, radiobuttons, checkmarks etc.)

Not trying to sell the software as I think the recently discovered AutoIt3 (for me at least) is significantly better. Never hurts to look at some of the competition.

Edited by alawoona
  • 9 months later...
Posted

Is it possible to get a list of window titles with AutoIt3?

With the Au3_Spy I've found that the visible window text of control "Shell_TrayWnd1" seems to be what I want; however, the corresponding window for that control appears to have a null title.

Any way to get a handle on all this?

<{POST_SNAPBACK}>

So, did you ever figure out a way to do this? I figure that if you didn't I can figure out something with ProccessList... and once more make the plunge to beta land.

"I'm not even supposed to be here today!" -Dante (Hicks)

Posted

So, did you ever figure out a way to do this?  I figure that if you didn't I can figure out something with ProccessList...  and once more make the plunge to beta land.

<{POST_SNAPBACK}>

Ok, I was wrong. Very wrong, I thought there was a way to get from process name to window control (classname, title, something)

not that I can see. drat, foiled again.

"I'm not even supposed to be here today!" -Dante (Hicks)

  • Administrators
Posted

Jon, good example of why having the ability to interact with class names and/or handles would be nice.  :) :)

Eh? You already can. Or do you not mean "classname=" stuff?


 

  • Administrators
Posted

Look at the timestamp on the post ;)

But the question remains how you could easily obtain a list of handles for all currently open windows.

:)

It's on the todo list and that gets done when everyone stops hassling me to update gui stuff and docs :)


 

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
  • Recently Browsing   0 members

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