burners Posted December 6, 2010 Share Posted December 6, 2010 I was looking for a simple way (maybe with Winexist or Processexist) to check if multiple windows of the same program are open. The program I am checking is Putty, The process name is always putty.exe. The Windows name is the IP of your connection and then putty, Example "192.168.1.1 - PuTTY" I have been using the following to match the window Opt("WinTitleMatchMode", 2) WinWaitActive(" - PuTTY", "") and then later WinActivate(" - PuTTY", "") So could I somehow look for with Winexist - PuTTY and then look again, then check to see if they match ? Or any other ideas like maybe looking at the process then find another process then see if the process ID's match. Thanks ~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK Link to comment Share on other sites More sharing options...
enaiman Posted December 6, 2010 Share Posted December 6, 2010 You could play a bit with "WinList" and the array returned. You can easily check the array for matches. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
Developers Jos Posted December 6, 2010 Developers Share Posted December 6, 2010 WinList() ? 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. Link to comment Share on other sites More sharing options...
burners Posted December 6, 2010 Author Share Posted December 6, 2010 OK I found it. I will play with the code once I get home tonight. $var = WinList() For $i = 1 to $var[0][0] ; Only display visble windows that have a title If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1]) EndIf Next ~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK Link to comment Share on other sites More sharing options...
burners Posted December 7, 2010 Author Share Posted December 7, 2010 Dizzune to tha Bizzuns lolz Opt("WinTitleMatchMode", 2) $var = WinList("PuTTY") $wcount = 0 For $i = 1 to $var[0][0] $wcount = $wcount +1 Next MsgBox(0, "Details", "Current open PuTTY Windows " & $wcount) ~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now