aleph01 Posted April 26, 2017 Posted April 26, 2017 I'm having issues trying to start IE In Private mode with two tabs, http://www.forsythpl.org is the active tab, https://www.google.com is the second tab. Using _IECreate and _IENavigate, I can open the browser and navigate, but not In Private mode. Using ShellExecute, I can open In Private mode, but navigation is not working. This code works fine except the browser isn't In Private mode: #include <IE.au3> $sURL = "http://www.forsythpl.org" $oIE =_IECreate($sURL, 0, 1, 1) __IENavigate($oIE, "https://www.google.com", 0, 0x1000) This code opens IE In Private mode but doesn't navigate: #include <IE.au3> $sURL = "http://www.forsythpl.org" $oIE = ShellExecute ("C:\Program Files (x86)\Internet Explorer\iexplore.exe", "-private") _IENavigate ($oIE, $sURL) __IENavigate($oIE, "https://www.google.com", 0, 0x1000) Can someone show me a way to open IE In Private mode with the two tabs? Thanks in advance. Meds. They're not just for breakfast anymore.
jguinch Posted April 26, 2017 Posted April 26, 2017 (edited) Try this one : #Include <IE.au3> Local Const $navOpenInNewTab = 0x0800 Local $sURL = "http://www.forsythpl.org" Local $oIE = _IECreatePrivate($sURL) $oIE.Navigate2('http://www.autoitscript.com/forum', $navOpenInNewTab) Func _IECreatePrivate($sURL = "", $iWait = 1) Local $iPid = ShellExecute ("iexplore.exe", "-private about:blank") If Not $iPid Then Return SetError(1, 0, 0) Local $hIEPrivate = WinWait("[REGEXPTITLE:\[InPrivate\]$]") Local $oIEPrivate = _IEAttach($hIEPrivate, "hwnd") If @error Then Return SetError(2, 0, 0) _IENavigate($oIEPrivate, $sURL, $iWait) Return $oIEPrivate EndFunc Edited April 26, 2017 by jguinch ss26 1 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
aleph01 Posted April 26, 2017 Author Posted April 26, 2017 Thanks, jguinch. That opens to the library website InPrivate. However, my __IENavigate line doesn't create the new tab (https://www.google.com). I just want to create it, and leave forsythpl.org as the active tab. Meds. They're not just for breakfast anymore.
aleph01 Posted April 26, 2017 Author Posted April 26, 2017 OK, I got it. __IENavigate does work, I just had to put it in the function. Thanks jguinch! Meds. They're not just for breakfast anymore.
jguinch Posted April 26, 2017 Posted April 26, 2017 Oups, I found a little bug. I edited my previous post. Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
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