Andrew Peacock Posted January 17, 2010 Share Posted January 17, 2010 (edited) Hi, I've been playing around with using an embedded browser to access a password-protected site (using basic authentication). The old way of doing it would have been (in a standard, non-Autoit IE instance): http://username:password@domain.com But as most of us know, Microsoft removed that functionality a while ago, and just going to domain.com doesn't present the standard login box. But it still seems to work within an embedded browser. I'd like to make sure this works across different IE/platform versions - any chance you could help test? I've got: Platform - XP Pro IE - 7.05739 CPU - 32 bit I greatly appreciate any help you can provide! Regards, Andy Edited January 18, 2010 by Andrew Peacock Link to comment Share on other sites More sharing options...
Andrew Peacock Posted January 17, 2010 Author Share Posted January 17, 2010 (edited) And I totally forgot to add sample code and URL details, so here it is: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> $username = "test" $password = "test" _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () GUICreate("Embedded Web control Test", 640, 580, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) $GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360) GUISetState() ;Show GUI _IENavigate ($oIE, "http://"& $username & ":" & $password & "@www.automateyourbusiness.com/test/") ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete() Exit You should see "Success!" if it works OK. Regards, Andy Edited January 17, 2010 by Andrew Peacock Link to comment Share on other sites More sharing options...
Andrew Peacock Posted January 17, 2010 Author Share Posted January 17, 2010 Hi Thanubis, Thanks for taking the time to help. And for the pointer on the 32/64 bit potential issue. Mine's 32 as well. Regards, Andy Link to comment Share on other sites More sharing options...
Andrew Peacock Posted January 18, 2010 Author Share Posted January 18, 2010 Tested on my work PC. Works OK on: XP SP2 Same version of IE 32 bit Regards, Andy Link to comment Share on other sites More sharing options...
jvanegmond Posted January 18, 2010 Share Posted January 18, 2010 Success! Windows 7 - 32 bit IE 8.0.7600 github.com/jvanegmond Link to comment Share on other sites More sharing options...
Andrew Peacock Posted January 18, 2010 Author Share Posted January 18, 2010 Success!Windows 7 - 32 bitIE 8.0.7600Manadar,Two birds with one stone! Thanks very muchAnyone else got Vista?Andy Link to comment Share on other sites More sharing options...
Andrew Peacock Posted January 18, 2010 Author Share Posted January 18, 2010 Hi all, Sorry to bump - but has anyone got Vista that could run this quick test, please? Regards, Andy Link to comment Share on other sites More sharing options...
Charlie Posted January 19, 2010 Share Posted January 19, 2010 Just tested it on Vista 32 bit with IE8 and works with no issues Link to comment Share on other sites More sharing options...
Fire Posted January 19, 2010 Share Posted January 19, 2010 It works fine too:Microsoft Windows XP Professional 5.1.2600 Service Pack 2IE 8.0.6001.18702 [size="5"] [/size] Link to comment Share on other sites More sharing options...
Andrew Peacock Posted January 19, 2010 Author Share Posted January 19, 2010 Fantastic everyone, thanks for helping out! I think that's pretty much all the bases covered, so no need for anyone to do any further testing as far as I'm concerned. Thanks again - you've been great! Andy 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