2Radon Posted April 2, 2014 Share Posted April 2, 2014 Hello! When I run this script, it opens them all in separate windows. I tried creating an IE in different ways, but all worked pretty much the same way. I need these three sites to open in a separate window together in tabs. But note that any combination of one, two or all three of these sites can be conditioned to open (= 1 or 0), though they always must be in a separate window, whether another IE window is already open or not. P.S. $webXX variables are read from ini file. $oIE = ObjCreate("InternetExplorer.Application") Sleep(1000) If $webGoogle = 1 Then $url = "www.google.com" ; Atea ONE $oIE = _IECreate($url, 1, 1, 1, 0) ;$Google = _IEAttach($oIE, "hwnd") _IELoadWait($oIE) Send("{ENTER}") _IELoadWait($oIE) EndIf If $webFB = 1 Then $url = "www.facebook.com" $oIE = _IECreate($url, 1, 1, 1, 0) ;$FB = _IEAttach($oIE, "hwnd") _IELoadWait($oIE) Send("{TAB}") Send($pwVIMS) Send("{ENTER}") _IELoadWait($oIE) EndIf If $webYT = 1 Then $url = www.youtube.com $oIE = _IECreate($url, 1, 1, 1, 0) ;$YT = _IEAttach($oIE, "hwnd") _IELoadWait($oIE) Send("{ENTER}") _IELoadWait($oIE) EndIf _WinWaitActivate("[CLASS:IEFrame]", "") WinMove("[CLASS:IEFrame]", "", $x, $y, $w, $h) Link to comment Share on other sites More sharing options...
Danp2 Posted April 2, 2014 Share Posted April 2, 2014 You can open a new tab using __IENavigate (note the double underscore; search the forum for some examples). Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
2Radon Posted April 15, 2014 Author Share Posted April 15, 2014 As I found in forums, a handle is not returned by that function, which makes _IELoadWait() not work. I don' think that is an option for me as I need to interact with the page before moving on. How do open a window of IE with multiple tabs one after another in a stable way? I have multiple pages like the IF part that need to open if true, some controls are sent to each page when it loads. $oIE = ObjCreate("InternetExplorer.Application") Sleep(1000) If $web1 = 1 Then $url = "https://www.website.com" $oIE = _IECreate($url, 1, 1, 1, 0) _IELoadWait($oIE) Send("{ENTER}") _IELoadWait($oIE) EndIf Link to comment Share on other sites More sharing options...
BrewManNH Posted April 15, 2014 Share Posted April 15, 2014 You don't need to use _IELoadWait with __IENavigate, or with _IECreate, both those functions have a parameter that causes it to internally call _IELoadWait. In fact your example script in post #3 is using _IELoadWait already, so using it twice is just redundant. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator 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