Jump to content

Multiple tabs in IE7


Recommended Posts

Is it possible to make a script with AutoIT to get one Internet Explorer windows and inside this window multiple tabs to different websites?

I have found a script on the internet but this is using java script:

var navOpenInBackgroundTab = 0x1000;
var oIE = new ActiveXObject("InternetExplorer.Application")
oIE.Navigate2("http://www.google.com/1");
oIE.Navigate2("http://www.google.com/2", navOpenInBackgroundTab);
oIE.Navigate2("http://www.google.com/3", navOpenInBackgroundTab);
oIE.Navigate2("http://www.google.com/4", navOpenInBackgroundTab);

But i dont have any clue about scripting in Javascript and for so far as i have tested this and adjusted i keep getting random errors.

So i thought, eej why not using AutoIT instead. Wich i know the basics of and hopefully AutoIT can get me in this situation.

Does someone have a clue?

ps. Executing a shortcut with "C:\Program Files\Internet Explorer\iexplore.exe www.google.com/1 www.google.com/2" will not work

Link to comment
Share on other sites

You mean in AutoIT i hope?

I can't find anything about ShellExecute in the help file from the beta version.

I only can find the navigate part in some example code, but for as far as i know this won't work.

Sjees i am donkey at programming, so sorry for the stupid questions.

Link to comment
Share on other sites

There is an undocumented function in IE.au3 that gives you access to the creating tabs... See here: http://www.autoitscript.com/forum/index.ph...mp;#entry275629 for a description, examples and the resons why it is undocumented at this point.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Hmmm... well you can do it without the undocumented function like this:

#include <IE.au3>
const $navOpenInBackgroundTab = 4096
$oIE = _IECreate()
$oIE.Navigate2("http://www.google.com/1")
$oIE.Navigate2("http://www.google.com/2", $navOpenInBackgroundTab)
$oIE.Navigate2("http://www.google.com/3", $navOpenInBackgroundTab)
$oIE.Navigate2("http://www.google.com/4", $navOpenInBackgroundTab)

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Didn't know it would be almost the same as the javascript :whistle:

But if i execute this little script it first opens a IE explore window with only a blank page, and second it opens another IE explore window with the 1,2,3,4 pages. Is it possible to start only the desired pages instead of a extra window with about blank?

I now you can use WinWait and WinClose, but i dont think that would be a nice solution.

Link to comment
Share on other sites

I don't get an extra window. Please read about IECreate, I'm sure you can get it todo what you want.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

...I can't find anything about ShellExecute in the help file from the beta version...

Both v3.2.2.0 and v3.2.3.0()beta have ShellExecute() documented... and it will open multiple tabs - as for wanting them to open in the background, I think that is a function of how IE7 is set to open new tab. I have mine set to go to the newest tab opened. if you want to force them to open in the background, then work with IE.au3. Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

In a default IE7 in a clean install of Windows Vista i get 2 IE7 windows, one with about:blank and a second one with the desired pages.

I have tried a couple of things, but still i can't get it to work.

I have downloaded the latest version of AutoIT and AutoIT Beta but that didn't changes anything.

Getting hopeless........ but i will keep trying......

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