Dox913

Inactive password text box

3 posts in this topic

Sorta new to Autoit, so please bare with me.

I have a password change window that will not allow me to tab out of the inactive username text field (username cannot be changed). I can tab manually using the keyboard. I've even tried selecting the password text box by ClassNNname and still no joy. Any help would be appreciated.

Func PasswordChange()
   Sleep(2000)
   _WinWaitActivate("Change Of Password Required","Required Access Cred")
      Local $isControlEnabled = ControlCommand("Change of Password Required", "", "[ClassnameNN:Edit1]")
         If $isControlEnabled = 0 Then
            Send("{TAB}")
            Sleep(1000)
            Send("examplepassword")
            Sleep(1000)
            Send("{TAB}")
            Sleep(1000)
            Send("examplepassword")
            Send("{TAB}")
            Send("{Enter}")
            Sleep(2000)
         Endif
EndFunc

pwbox.jpg

Share this post


Link to post
Share on other sites



Is your code running to completion?

I imagine it could hang on your WinWait() and then your sends only take place if $isControlEnabled = 0 so have you check to see that variable is returning 0 as a value? 

I would just dumb it down and do a WinWait() WinActivate() and then Send() without all the extras.

You can also remove the Sleep() if things are moving too fast you can change the default send speed vai options.

 

https://www.autoitscript.com/autoit3/docs/functions/AutoItSetOption.htm

 

Share this post


Link to post
Share on other sites

You can get the handle of the editboxs and then use ControlSetText

 

Saludos


 

venezuela.png Would you like to say thank to Danyfirex using a warmy way?  offer me a cup of coffee... coffee.png

autoit_scripter_blue_userbar.png

       AutoIt...

 

 

Share this post


Link to post
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