Jump to content

Recommended Posts

Posted

Hi,

I am a new user of AutoIT v3. I am using it to automate Windows RDC login sessions to load test a server. From a Windows desktop I repeatedly call the Remote Desktop login application with different usernames and a generic password.

Using AutoIT, I created an array containing 50 numbered user names of the form NNNtstuser were NNN is a zero padded 3 digit identifier. For instance the first user is 001tstuser, the second 002tstuser, etc. The password for each account is just the text "password".

When I run the script, at random points in successive runs, the text sent to the login field using the Send function in AutoIT will capture the first letter of the next send command, or, the second send command for the password will be incomplete. For instance I often get "001tstuserp" entered in the login field, or I get assword (charming) in the password field.

Code snippet

Send($loginarray[$i])

Sleep(1000)

MouseClick("left",200,200,1)

Sleep(1000)

Send("password")

I have tried adding longer sleep times after entering sending the username, and increasing the Opt keystroke delay value (up to 500 ms). Neither has prevented this from happening.

Any ideas what is going on here? Is there a better way to enter text in a text field than using Send? I decided it wasn't my array because I only generate login names and send the static text "password" later, so there can't be any way of the array to be contaminated with the password text.

Thanks

PW

Posted

Try using ControlSend instead Send. Maybe that'll take care of this issue.

I haven't used that function before, but since I am using the Microsoft Remote Desktop application, I can be relatively confident they are using MS controls.

Thanks!

PW

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
×
×
  • Create New...