Jump to content

Shell.Explorer.2 and Windows 2000


Recommended Posts

Hey guys, this is an odd problem. I created a very simple file browser, explorer alternative.

Just a simple script like this,

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$oIE = ObjCreate("Shell.Explorer.2")

; Create a simple GUI for our output
GUICreate("Explorer Test", 640, 580,(@DesktopWidth-640)/2, (@DesktopHeight-580)/2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
$GUIActiveX = GUICtrlCreateObj( $oIE, 0, 0 , 640 , 580 )

GUISetState ();Show GUI

$oIE.navigate("file://c:\")

Do
   Sleep(100)
Until NOT $oIE.Busy

While 1
    $msg = GUIGetMsg()
    
    Select
    Case $msg = $GUI_EVENT_CLOSE
     GUIDelete ()
     $oIE = 0; Remember to free object
     Exit
    EndSelect
    
Wend
Exit

It works, but in Windows 2000, when you try to open a folder within this application. It will open it in a new window, not in itself. Unlike in Vista or WinXP. Anyone have any possible ideas on how to make only open folders in itself?

Link to comment
Share on other sites

Hey guys, this is an odd problem. I created a very simple file browser, explorer alternative.

Just a simple script like this,

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$oIE = ObjCreate("Shell.Explorer.2")

; Create a simple GUI for our output
GUICreate("Explorer Test", 640, 580,(@DesktopWidth-640)/2, (@DesktopHeight-580)/2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
$GUIActiveX = GUICtrlCreateObj( $oIE, 0, 0 , 640 , 580 )

GUISetState ();Show GUI

$oIE.navigate("file://c:\")

Do
   Sleep(100)
Until NOT $oIE.Busy

While 1
    $msg = GUIGetMsg()
    
    Select
    Case $msg = $GUI_EVENT_CLOSE
     GUIDelete ()
     $oIE = 0; Remember to free object
     Exit
    EndSelect
    
Wend
Exit

It works, but in Windows 2000, when you try to open a folder within this application. It will open it in a new window, not in itself. Unlike in Vista or WinXP. Anyone have any possible ideas on how to make only open folders in itself?

As I recall that was one of many quirks in Win 2K and I don't think you can do anything about it. Dale may have an idea but I'm pretty sure that what you are seeing is default behaviour for 2000. You might be able to do something in Folder Options by making sure that it is set to re-use the existing window and not "Launch folder windows in a separate process" or whatever term it was in 2000

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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