Jump to content

_IECreate Troubles with Intranet sites


 Share

Recommended Posts

I am trying to make a script to open two Intranet sites in tabs in one IE window and then maximize the window.  I'm using the following code.

#include <IE.au3>

$oIE = _IECreate("intranetsite1")
__IENavigate($oIE, "intranetsite2", 0, 0x800)
$HWND = _IEPropertyGet($oIE, "hwnd")
WinSetState($HWND, "", @SW_MAXIMIZE)
_IEAction($oIE, "visible")
_IELoadWait($oIE)

When I run the script IE opens and goes to the first page but then nothing else happens.

If I modify the code so the _IECreate points to an internet site it then also opens a second tab with the second site and then maximizes as expected.

I see this behavior no matter what intranet site I put in the _IECreate line.

Is there a way to get this to work with intranet sites?

Thanks

Link to comment
Share on other sites

Are you using a modified _IENavigate? As, that function should only take 3 parameters.

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

I'm using __IENavigate instead of _IENavigate to make it open in a new tab instead of the same tab.

It really appears this has something to do with the site in _IECreate being seen as an Intranet site by IE.  If I rem out the __IENavigate line the window does not maximize with an Intranet site in _IECreate, but does with an Internet site, such as www.google.com.  However if I then put www.google.com in the Intranet Zone in IE it no longer maximizes.

Link to comment
Share on other sites

Try using ShellExecute then, just have a look at the 5th example for 

_IECreate

and see if that does what you would like. :)

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

So I figureed out if I wait a few seconds after the _IECreate and then use _IEAttach to attach to the window that was just opened everything else works fine.  Thanks for the help, it got me thinking about delays.  I'll post my final code just incase anybody is interested.

#include <IE.au3>

$oIE = _IECreate("intranet1")
sleep(3000)
$oIE = _IEAttach("intranet1")
__IENavigate($oIE, "intranet2", 0,0x800)
$HWND = _IEPropertyGet($oIE, "hwnd")
WinSetState($HWND, "", @SW_MAXIMIZE)
_IEAction($oIE, "visible")
Link to comment
Share on other sites

Glad you found a solution to your needs. :)

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

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