Jump to content

pass the IE handle to an active windows authentication prompt


Drac89
 Share

Recommended Posts

How do i pass the IE handle to an active windows authentication prompt when the IE shows it is " waiting " , right now it is nt detecting the windows security prompt

I used the below to wait for it to load until the 60ms timeout but still it isnt working  :

 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=ps_test.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <Constants.au3>
#include <IE_v1.au3>

If $CmdLine[0] < 2 Then
   MsgBox($MB_OK, "Usage", "ps_WAN <username> <password>")
Else
   wan($CmdLine[1], $CmdLine[2])
EndIf

Func wan($email, $password)

 $oIE = _IECreate()
$ieo=_IENavigate($oIE, "https://cccc")
_IELoadWait($ieo,0,60)

 Local $hWnd = WinExists("Windows Security")
if $hWnd = 0 Then
   MsgBox($MB_OK, "Usage", "timeout")
   EndIf
ControlFocus("Windows Security", "", "[CLASS:DirectUIHWND]")
ControlFocus("Windows Security", "", "[CLASS:Edit; INSTANCE:1]")

 

image.png.dceafc03f35707c66f32ae7f643c464f.png

Edited by Drac89
wrong image
Link to comment
Share on other sites

24 minutes ago, Drac89 said:

 $oIE = _IECreate()
$ieo=_IENavigate($oIE, "https://cccc")
_IELoadWait($ieo,0,60)

 Local $hWnd = WinExists("Windows Security")

This doesn't really make sense to me. Also, _IENavigate automatically includes a timeout.

I would suggest trying something like this --

$oIE = _IECreate()
_IENavigate($oIE, "https://cccc", 0)

$hWnd = WinWait("Windows Security", "", 60)

 

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

×
×
  • Create New...