Jump to content
Sign in to follow this  
PhilHibbs

Send strings sometimes get garbled

Recommended Posts

PhilHibbs

I'm launching several copies of an application, and automating the filling in of the user name and password fields. Because some of the application windows pop up during the log in process for the subsequent ones, I use SendKeepActive to prevent the keys going to the wrong window. This almost works, but occasionally a keypress is lost which can result in the password being entered in a plain text input box.

Any suggestions how I can prevent this interruption? The only thing I can think of would be to fill each edit box individually, and verify the contents before moving on to the next edit box or completing the process. If the last {Enter} is lost, I'd have to check to see that the login window has disappeared.

Edited by PhilHibbs

Share this post


Link to post
Share on other sites
martin

I'm launching several copies of an application, and automating the filling in of the user name and password fields. Because some of the application windows pop up during the log in process for the subsequent ones, I use SendKeepActive to prevent the keys going to the wrong window. This almost works, but occasionally a keypress is lost which can result in the password being entered in a plain text input box.

Any suggestions how I can prevent this interruption? The only thing I can think of would be to fill each edit box individually, and verify the contents before moving on to the next edit box or completing the process. If the last {Enter} is lost, I'd have to check to see that the login window has disappeared.

Probably ControlSend would be more reliable if you can use it.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
Fulano

I've had this problem, the way to fix it is to modify the delay between keystrokes. It'll vary by machine (probably) and application (certainly), but for me, this works:

AutoItSetOption("SendKeyDelay", 20)

Good Luck


#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

Share this post


Link to post
Share on other sites
PhilHibbs

That's a bit tidier, thanks, but I think my main problem was that the login window for the previous launch was still present when I started trying to send keys to the newly-launched one, and it was getting the windows mixed up. It now waits for the login window to disappear before allowing the next one to be started. Full script will appear in Example Scripts soon.

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  

×