EmptySpace Posted May 2, 2012 Posted May 2, 2012 How i can automate explorer shell in GUI? For example there is simple browser expandcollapse popup#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/brows...r/reference/objects/internetex 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",585, 462, (@DesktopWidth - 219) / 2, (@DesktopHeight - 101) / 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("www.google.lt") sleep(3000) ; 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("http://www.autoitscript.com") 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 I know how to make it more advanced. But now I dont know if its possible to make/automate it. Like there is IE functions for example _IELinkClickbyindex etc. How i should make it for this? I tried to use same commands with variables but i get error.
water Posted May 2, 2012 Posted May 2, 2012 Seems to be possible. Replace $oIE.navigate("www.google.lt")with$oIE.navigate("C:temp")and see what you get. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
EmptySpace Posted May 2, 2012 Author Posted May 2, 2012 You mean opening IE from"""$oIE.navigate("C:temp")""" and making like normal IE and automate it with NORMAL functions/comands?
water Posted May 2, 2012 Posted May 2, 2012 Why not? I got a pretty listing of all my files in C:temp. It depends on what you try to do. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
EmptySpace Posted May 2, 2012 Author Posted May 2, 2012 I mean automate IE in gui like in real Internet Explorer . Use _IEAction, _IEBodyReadHTML,_IEBodyWriteHTML and so on.
DicatoroftheUSA Posted May 2, 2012 Posted May 2, 2012 Virtually everything that can be done in the explorer shell can be done via command line, group policy or regedit. What are you trying to accomplish? Statism is violence, Taxation is theft. Autoit Wiki
KaFu Posted May 2, 2012 Posted May 2, 2012 Maybe something more like the example for _IECreateEmbedded() in the help-file is what you really want? OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
EmptySpace Posted May 2, 2012 Author Posted May 2, 2012 (edited) KaFu! Thanks for this! It works i just got bad example. In this one all comands works. Edited May 2, 2012 by Edgaras
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