Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

AdlibRegister

$
0
0

I'm trying to use AdlibRegister to do a WinWaitActive, and type some credentials for me.

I'm only doing it this way because I need to type the credentials into a popup that appears from a previous command that doesn't finish until the credentials are typed.

If GUICtrlRead($cAuto) = $GUI_CHECKED Then         AdlibRegister("EnterCreds2", 5000)         ExecuteCmd("Connect-MsolService")         AdlibUnRegister("EnterCreds2")     Else         ExecuteCmd("Connect-MsolService")     EndIf Func EnterCreds2()     If WinWaitActive("Enter Credentials", "", 4) <> 0 Then         Send(GUICtrlRead($iUsername) & "{TAB}" & GUICtrlRead($iPassword) & "{ENTER}")     EndIf EndFunc   ;==>EnterCreds2

Is this the wrong way to do it? Or is it not possible?

 

I suppose another way to do it is by running a separate script that I pass the credentials to, but that doesn't appeal to me if there is an alternative.

 

 

 


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>