smahdi83 Posted October 19, 2007 Share Posted October 19, 2007 Hi, What I am trying to do is quite simple. I have a Microsoft Web Browser ActiveX control and I then use the navigate2 method to go to a folder locally on the PC. For example: #include <GUIConstants.au3> $Form1 = GUICreate("AForm1", 388, 279, 322, 198, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS)) $Obj1 = ObjCreate("Shell.Explorer.2") $Obj1_ctrl = GUICtrlCreateObj($Obj1, 0, 0, 1276, 908) GUISetState(@SW_SHOW) $Obj1.navigate2("c:") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd But what I am trying to do is actually display "My Computer", not "C:". How can I do that. Thanks, Link to comment Share on other sites More sharing options...
smashly Posted October 19, 2007 Share Posted October 19, 2007 Hi, use CLSID eg: #include <GUIConstants.au3> $Form1 = GUICreate("AForm1", 388, 279, 322, 198, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS)) $Obj1 = ObjCreate("Shell.Explorer.2") $Obj1_ctrl = GUICtrlCreateObj($Obj1, 0, 0, 1276, 908) GUISetState(@SW_SHOW) $Obj1.navigate2("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Cheers Link to comment Share on other sites More sharing options...
smahdi83 Posted October 19, 2007 Author Share Posted October 19, 2007 (edited) Hi, use CLSID eg: #include <GUIConstants.au3> $Form1 = GUICreate("AForm1", 388, 279, 322, 198, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS)) $Obj1 = ObjCreate("Shell.Explorer.2") $Obj1_ctrl = GUICtrlCreateObj($Obj1, 0, 0, 1276, 908) GUISetState(@SW_SHOW) $Obj1.navigate2("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Cheers Thanks a million! Now I noticed how this doesn't work with Vista. Would you happen to know how to do it for Vista? Thanks again, Edited October 19, 2007 by smahdi83 Link to comment Share on other sites More sharing options...
smashly Posted October 19, 2007 Share Posted October 19, 2007 Your Welcome. No Idea for vista sorry. Vista and I don't play well together I'm afraid to say. But one day when M$ can offer a straight out of the box OS that doesn't nag like a mofo and not call it better security instead of what it really is (BABYSITTING METHOD) and they can offer to streamline my use instead of hindering my use Then maybe vista and I might get on ...lol I'm not bias just anti vista... lmao *Rant* Cheers Link to comment Share on other sites More sharing options...
bolthead Posted October 19, 2007 Share Posted October 19, 2007 Thanks a million! Now I noticed how this doesn't work with Vista. Would you happen to know how to do it for Vista? Thanks again,Try this #include <GUIConstants.au3> Const $My_Computer = 0x11 $Form1 = GUICreate("AForm1", 388, 279, 322, 198, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS)) $Obj1 = ObjCreate("Shell.Explorer.2") $Obj1_ctrl = GUICtrlCreateObj($Obj1, 0, 0, 1276, 908) GUISetState(@SW_SHOW) $Obj1.navigate2($My_Computer) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd For other Special Folders see http://www.autoitscript.com/forum/index.php?showtopic=42394 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