 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
areebb
Joined: 13 Feb 2008 Posts: 7
|
Posted: Fri Jun 13, 2008 7:58 am Post subject: Cycling through all windows that match WinTitle |
|
|
Hey guys,
I've been on this forum a couple times before and have received amazing help so I'm hoping for one more.
Here's my script which sends the "n" key to any internet explorer windows that ask to be closed:
| Code: | SetTitleMatchMode, 2
WinWait, Internet Explorer,, 60
IfWinNotActive, Internet Explorer, , WinActivate, Internet Explorer,
WinWaitActive, Internet Explorer,, 60
WinGetText, OutputVar
Sleep, 100
IfInString, OutputVar, close this window
{
Send, n
} |
The window has the title "Internet Explorer" and nothing else. So I have to identify it by the WinGetText. Now the problem is, many times people have another instance of Internet Explorer running which matches the same title but does not have that text. Can I cycle through all these windows to find the one that has the text in it, and send the n key? It should be possible...
Thanks in advance.
-Areeb _________________ Areeb Bajwa |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6847 Location: Pacific Northwest, US
|
Posted: Fri Jun 13, 2008 5:21 pm Post subject: |
|
|
you can use WinGet, (List option) to list all IE windows by window ID, then cycle through those using Loop.
you can even use WinGet, List to filter for WinText and Wintitle at the same time. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|