Jump to content

_IECreateEmbedded and _IENavigate to server with a port


Recommended Posts

I'm trying to create a simple GUI with an embedded IE control to log into some sites here at work. The GUI is nothing fancy, so I won't bother posting. It's an IE object created with _IECreateEmbedded, then placed in the GUI with GuiCtrlCreateObj and navigated with _IENavigate.

The problem is that instead of the server login window popping up (standard windows "Connect to..." login message window), the connection fails and I get an IE error page. The same page works fine in normal IE and with _IECreate as expected. The basic URL structure is

http://server.domain.xyz.com:8080/admin.asp

I'm wondering if the port 8080 is throwing it off somehow. I can't think of any general www pages that use this kind of login box anymore to do additional tests unfortunately. So does anyone know if this is a known problem or have a similar one? Possible solution?

Link to comment
Share on other sites

I'm trying to create a simple GUI with an embedded IE control to log into some sites here at work. The GUI is nothing fancy, so I won't bother posting. It's an IE object created with _IECreateEmbedded, then placed in the GUI with GuiCtrlCreateObj and navigated with _IENavigate.

The problem is that instead of the server login window popping up (standard windows "Connect to..." login message window), the connection fails and I get an IE error page. The same page works fine in normal IE and with _IECreate as expected. The basic URL structure is

http://server.domain.xyz.com:8080/admin.asp

I'm wondering if the port 8080 is throwing it off somehow. I can't think of any general www pages that use this kind of login box anymore to do additional tests unfortunately. So does anyone know if this is a known problem or have a similar one? Posible solution?

I don't know of any publicly accessible sites with alternate ports, but :80 in the syntax doesn't hurt it:
#include <IE.au3>

$hGUI = GUICreate("Test", 800, 600)
$oIE = _IECreateEmbedded()
GUICtrlCreateObj($oIE, 10, 10, 780, 580)
GUISetState()
_IENavigate($oIE, "http://www.htmlcodetutorial.com:80/linking/linking_famsupp_70.html")

$colLinks = _IELinkGetCollection($oIE)
For $oLink in $colLinks
    If String($oLink.InnerText) = "this link" Then
        _IEAction($oLink, "click")
        ConsoleWrite("Popup should be displayed" & @LF)
        ExitLoop
    EndIf
Next

Do
    Sleep(20)
Until GUIGetMsg() = -3

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Thanks for the reply. Perhaps it's the popup box then. It's not an IE popup like your example, but a server login popup box. It's actually a windows dialog box, like when you connect to a remote server and you have to authenticate with your login info.

Here's an example. Normally, trying to download this file pops up the same login box. Here, it just fails and no login box is displayed.

#include <IE.au3>

$hGUI = GUICreate("Test", 800, 600)
$oIE = _IECreateEmbedded()
GUICtrlCreateObj($oIE, 10, 10, 780, 580)
GUISetState()
_IENavigate($oIE, "http://download.eset.com/download/win/eav/eav_nt32_enu.msi")

Do
Until GUIGetMsg() == -3

_IECreate("http://download.eset.com/download/win/eav/eav_nt32_enu.msi")
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...