Sign in to follow this  
Followers 0
wallstreetsystems

ControlSetText does not work to set password text.

1 post in this topic

I use ControlSetText to set host, username and password. All return 1 to indicate set completed, but the password text is not set correctly. The ControlGetText() returns blank for the password field.

WaitUntilWinActive() is my customized function.

Here is my code:

WaitUntilWinActive($title, "Specify the hostname of the LDAP server", $sleepTime)

If ControlSetText ($title, "", "[CLASS:RichEdit20W;Instance:1]", $ldaphost, 1 ) == 1 Then

MsgBox(0, "SetHost", ControlGetText ($title, "", "[CLASS:RichEdit20W;Instance:1]"))

Send("!n")

WaitUntilWinActive($title, "Specify a user name and password", $sleepTime)

If ControlSetText ($title, "", "[CLASS:RichEdit20W;Instance:1]", $username, 1 ) == 1 Then

Sleep(30)

If ControlSetText ($title, "", "[CLASSNN:Edit1]", $password, 1 ) == 1 Then

Sleep(30)

MsgBox(0, "Installation Process Set variables", "ldaphost = " & $ldaphost & "; username = "& ControlGetText ($title, "", "[CLASS:RichEdit20W;Instance:1]") & "; password = " & ControlGetText ($title, "", "[CLASSNN:Edit1]"))

Else

MsgBox(4096, "Set password", "failed")

EndIf

Else

MsgBox(4096, "Set User name", "failed")

EndIf

Else

MsgBox(4096, "SetHost", "failed")

EndIf

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
Sign in to follow this  
Followers 0