E1M1 Posted February 19, 2009 Share Posted February 19, 2009 (edited) 1)I need method to find if any new windows were created 2)I need to know if any of existing windows are closed For my 1-st method I tried this WinWaitActive("") MsgBox(1,1,WinGetTitle("")) But its not good method I suppose I cant find method to register if any window is closed. WinWaitClose("") needs to have given window title, but how to make this command works with out given window? I actually need something looks like WinWaitCreate(<any>) and WinWaitclose(<any of opened windows>) I need it because I want create something like taskbar where you can see currently open window names in real time. Edited February 19, 2009 by E1M1 edited Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 19, 2009 Moderators Share Posted February 19, 2009 E1M1,This post might help you. It lists the active windows in Z-order.By the way, the thread which contained it was on the first page of the search results for "list+windows".............. ;-)M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
E1M1 Posted February 19, 2009 Author Share Posted February 19, 2009 E1M1, This post might help you. It lists the active windows in Z-order. By the way, the thread which contained it was on the first page of the search results for "list+windows".............. ;-) M23wow nice, thanks edited Link to comment Share on other sites More sharing options...
E1M1 Posted February 19, 2009 Author Share Posted February 19, 2009 But how I make GUI now? Cuttently I get lots of buttons and I nothing happens when I click on them, how I make that script thatway I have only 1 row of buttons an when I click on button I want get msng box says text that is on the button I click expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $buffer = "" $Form1 = GUICreate("Form1", 926, 908, 193, 115) ;~ $Button1 = GUICtrlCreateButton("Button1", 16, 24, 75, 25, 0) GUISetState(@SW_SHOW) ;~ $i = 1 ;~ While 1 ;~ $i = $i +1 ;~ $nMsg = GUIGetMsg() ;~ Switch $nMsg ;~ Case $GUI_EVENT_CLOSE ;~ Exit ;~ EndSwitch ;~ $button2 = GUICtrlCreateButton("lol",$i * 74,10,75,20) ;~ WEnd $height = 0 While 1 ToolTip("") $list = WinList() If $list[0][0] = 0 Then Exit $i = 0 For $n = 1 to $list[0][0] If Not IsVisible($list[$n][1]) Then ContinueLoop $i += 1 If Not StringLen($list[$n][0]) Then $buffer &= $i & ": " & GetClassName($list[$n][1]) & @LF Else $buffer &= $i & ": " & $list[$n][0] & @LF EndIf $left = $i * 74 If $left > 900 Then $height = $height + 25 EndIf $button2 = GUICtrlCreateButton(GetClassName($list[$n][1]),$left,$height,75,20) Next ToolTip($buffer) $buffer = "" Sleep(1000) WEnd Func GetClassName(ByRef $hWnd) Local $ret = DLLCall("user32.dll","int","GetClassName","hwnd",$hWnd,"str","","int",5000) If IsArray($ret) Then Return $ret[2] Else Return "" EndIf EndFunc Func IsVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc edited 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