Jump to content

select active windows, and select in list


Recommended Posts

My problem / question is about the selection of windows in a list.

In fact, I would like to post the windows which contain “onversation” in a list. Then to select the window to be activated.

The selection of windows which contain "onversation", I think to do this with ((((Opt("WinTitleMatchMode", 2))))).

And also use the wingettitle command...

But after.... I don't know how to proceed

Opt("WinTitleMatchMode", 2)
$var = WinList ("onversation")
For $i = 1 to $var[0][0]

If $var[$i][0] <> "" Then
      GUICtrlCreateListViewItem( "|" & $var[$i][0], $listview )
   ;MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1])
  EndIf
Next
$ok = GUICtrlCreateButton ( "ok", 60, 250, 80, 28 )
$cancel = GUICtrlCreateButton ( "cancel", 120, 250, 70, 28)
Edited by jerem488

Qui ose gagneWho Dares Win[left]CyberExploit[/left]

Link to comment
Share on other sites

#include <GUIConstants.au3>
#include <GUIListView.au3>

Opt("WinTitleMatchMode", 2)

GUICreate("listview items",220,250, 100,200,-1,$WS_EX_ACCEPTFILES)
$listview = GuiCtrlCreateListView ("Window",10,10,200,150);,$LVS_SORTDESCENDING)
$button = GuiCtrlCreateButton ("Get windows",75,170,100,20)
GuiSetState()

Do
  $msg = GuiGetMsg ()
        Select
    Case $msg = $button
                _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($listview))
        $var = WinList ("onversation")
;~      $var = WinList ("AutoIt")
        For $i = 1 to $var[0][0]
;~        ConsoleWrite($var[$i][0] & @cr)
            If $var[$i][0] <> "" Then
              GUICtrlCreateListViewItem($var[$i][0], $listview )
            EndIf
        Next
         EndSelect
Until $msg = $GUI_EVENT_CLOSE

Link to comment
Share on other sites

Yes, it is thank you

But how to make with the "GUICtrlCreateListView" command which we select the window we want activate ??

with a checked system ?

Edited by jerem488

Qui ose gagneWho Dares Win[left]CyberExploit[/left]

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...