JohnBailey Posted October 22, 2007 Share Posted October 22, 2007 (edited) How do I retrieve whether or not an explorer window has the folderview panel open or closed. There is an example below taken from the help file, but adjusted to show things can be set and things can be retrieved. All mentions of this online referencing msdn's site or a direct search on msdn, turns up dead links on msdn. I thought by now I'd stumble on the answer.; Example 1 ; ; Counting the number of open shell windows $oShell = ObjCreate("shell.application"); Get the Windows Shell Object $oShellWindows=$oShell.windows; Get the collection of open shell Windows if Isobj($oShellWindows) then $string="" ; String for displaying purposes for $Window in $oShellWindows; Count all existing shell windows $String = $String & $window.LocationName & @CRLF ;$window.Visible=0 ConsoleWrite('Shell Msg: '& $window.locationURL () &@LF) next ;Msgbox(0,"Shell Windows","You have the following shell windows:" & @CRLF & @CRLF & $String); endifNOTE: the folderview panel I'm referring to may just be referred to by smarter people as just Folder Panel or Folder ToolbarGETTING CLOSEThank you Dale for getting me the function namehttp://msdn2.microsoft.com/en-us/library/bb774150.aspxThis shows how to open it, but how do we find out / get if it's already openTOOLS FOR THOSE HELPINGhttp://msdn2.microsoft.com/en-us/library/bb762759.aspxhttp://msdn2.microsoft.com/en-us/library/bb774150.aspx"Non-msdn-method": #422514 Edited October 23, 2007 by JohnBailey A decision is a powerful thing Link to comment Share on other sites More sharing options...
JohnBailey Posted October 23, 2007 Author Share Posted October 23, 2007 While this is not an "msdn method" (as I'm looking for), this is a bit closer in effect. The problem with the below , even, is that it returns only if the folders bar was ever open in that window. That is not the same a currently open. $oShell = ObjCreate("shell.application") ; Get the Windows Shell Object If Not IsObj($oShell) Then MsgBox(0,'','Not Obj') Exit EndIf $oShellWindows=$oShell.windows $wincountTotal=$oShell.windows.count For $Window in $oShellWindows ; Count all existing shell windows ConsoleWrite('Shell Msg: '& $window.locationURL () &@LF) ; Gets Local $thisHwd = HWnd($window.HWnd()) Local $BrowserBar_HWnd=ControlGetHandle($thisHwd,'','[Class:SysTreeView32;Instance:1]');'[Class:ReBarWindow32;Instance:2]') Local $BrowserBar_PosA = ControlGetPos($thisHwd,'',$BrowserBar_HWnd) ;Actions ;WinActivate($thisHwd) ;Control Returns ConsoleWrite('Control: '&$BrowserBar_HWnd&@LF) ConsoleWrite('Control Pos X: '&$BrowserBar_PosA[0]&@LF) ConsoleWrite('Control Pos Y: '&$BrowserBar_PosA[1]&@LF) Next Anyone want to help? ::Nudge:: A decision is a powerful thing 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