Jump to content

Shell.Explorer.2 in Windows 7


redao
 Share

Recommended Posts

Sorry to re-open this thread, it`s the same base question of

I have the same problem, but on Windows 7 with the code bellow:

#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

I cant navigate in folders into the same window, when i click in a folder... The Windows open a new explorer window with the selected folder! I need a simple help to work this code correctly. I know there are several examples of file browser navigates... But dont want anything complex, just something simple to navigate inside the folder that i specify and open files.

Sorry my bad google english translate =].

Edited by redao
Link to comment
Share on other sites

42 views at this moment and nobody reply my message? Common guys! Help me :graduated:.

12 days you have been registered and still havent read the FAQs, specifcally the section about bumping your own threads.

Or maybe you have, but feel your problem is more important. :(

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

12 days you have been registered and still havent read the FAQs, specifcally the section about bumping your own threads.

Or maybe you have, but feel your problem is more important. :graduated:

WOW! "sirens" Troll mode on!

Sincerely... I don't read and i am absolutely sure that 90% of who register here, doesn't read the rules and FAQ. But always have an expert like you to show for the admins of the forum. Maybe you could help and try not do job their or better... say nothing!

But if it disturbs you, not problem. Problem and threads SOLVED!

Thanks for reply and view.

Link to comment
Share on other sites

WOW! "sirens" Troll mode on!

Sincerely... I don't read and i am absolutely sure that 90% of who register here, doesn't read the rules and FAQ. But always have an expert like you to show for the admins of the forum. Maybe you could help and try not do job their or better... say nothing!

But if it disturbs you, not problem. Problem and threads SOLVED!

Thanks for reply and view.

Well whatever you think, but I tried to be all nice like you and put a wink smiley to validate my useless post.

But seeing as how you want to try and make me look like a arse kisser, I will just tell you to 'fuck off' you clown.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

  • 2 months later...

Hi people,

I have strictly the same problem and after searching in AutoIt help, forums and Google for hours, I still have no clue.

I try to embed a Windows explorer window in an autoit window.

I tried this sample script in Windows 7 to test how it works :

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

Opt('MustDeclareVars', 1)

Example()

; Simple example: Embedding an Internet Explorer Object inside an AutoIt GUI
;
; See also: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/internetexplorer.asp
Func Example()
    Local $oIE, $GUIActiveX, $GUI_Button_Back, $GUI_Button_Forward
    Local $GUI_Button_Home, $GUI_Button_Stop, $msg

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

    ; Create a simple GUI for our output
    GUICreate("Embedded Web control Test", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
    $GUIActiveX = GUICtrlCreateObj ($oIE, 10, 40, 600, 360)
    $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30)
    $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30)
    $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30)
    $GUI_Button_Stop = GUICtrlCreateButton("Stop", 330, 420, 100, 30)

    GUISetState()       ;Show GUI

    $oIE.navigate("c:\")

    ; Waiting for user to close the window
    While 1

        $msg = GUIGetMsg()

        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $GUI_Button_Home
                $oIE.navigate("c:\")
            Case $msg = $GUI_Button_Back
                $oIE.GoBack
            Case $msg = $GUI_Button_Forward
                $oIE.GoForward
            Case $msg = $GUI_Button_Stop
                $oIE.Stop
        EndSelect

    WEnd

    GUIDelete()
EndFunc   ;==>Example

... and just like "Redao" said, it opens a new explorer window when I start to browse "C:\".

I tested the same script in Windows XP and i got no problem : I could browse within the original Auto IT window...

My questions :

1. Does someone know how to force a correct behaviour with Windows 7 ?

2. Does someone know an alternate way to embed an explorer window within an AutoIt GUI that works the same way on XP and 7 ?

I've been using AutoIt for 2 years but this is the first time I request help on the forum : I am not used to involve the community in my dev issues but on this case, i feel stuck and a little help would be appreciated. :-)

Thx very much

Pedrit0

Pedrit0, calme et tranquille, la tete dans les nuages et la b*** dans le champagne.

Link to comment
Share on other sites

I also wanted to precise :

I checked in Windows the option "launch windows in separate processes", enabled and disabled it : it changed nothing...

I also ran my script on 2 other different installations of Win 7 "as administrator" : useless

that's all :-)

Pedrit0, calme et tranquille, la tete dans les nuages et la b*** dans le champagne.

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