Jump to content
Sign in to follow this  
scatterjoy

Typos or Missed Keystrokes

Recommended Posts

scatterjoy

Hi, If this problem is common or otherwise identified as something else, please help me find the correct search term to implement a correction.

We're using AutoIt to mimic keystrokes into a java based web application (oracle). We're using a Dell Latitude Core2Duo.

Keystrokes sequences are programmed in AutoIT and the actual data entered is pulled from (directly or indirectly, I don't know) MSAccess.

The issue is that data is often typographically incorrect (typos). For example, correct entry 801543 would read 01543 at a rate of 1 in 10 or so attempts.

I added setkeydelay = 100 which reduced the error rate to about 1 in 50 attempts, but it's still inexplicable. It's as if AutoIT needs to take a typing course.

Is there a common fix to this? The problem worsened on this new faster PC. I have been unable to find a way to slow the clockspeed reliably or at my technical level (nor do I wish that to be the solution). I really appreciate what this program can do. Super fun to learn this stuff.

Share this post


Link to post
Share on other sites
Pain

Try to increase Opt("SendKeyDownDelay") some, from the helpfile:

For applications that take a while to register keypresses (and many games) you may need to raise this value from the default.

Since you didn't post any code I don't know, but wouldn't it be possible to add for example 801543 to the clipboard with Clipput("801543") (or a variable in your case) and Clipget to send it?

Share this post


Link to post
Share on other sites
someone

Is it possible for you to show your code, or a reproducer? Also, if you throw in a message box or console write is the text incorrect there or only after the send command (if you are using send that is).

Otherwise, can you use controlsettext instead of send? or perhaps even clipput/clipget?

Did you also playing with SendKeyDownDelay?

If you can post a reproducer that would help a lot.


While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites
scatterjoy

Thanks. I've added the sendkeydowndelay, but in running another test, it appears that the setkeydelay and sendkeydowndelay may not be covering my tabs. It still blows turbo fast through tabs.

Is there a way to fix this simplistic code to delay tabs? I believe the better solution would be to learn about loops. I can do a send tab sleep send tab sleep thing.

($Glprod = ERP screens running on Java GUI's (if I've used the terms correctly).)

$A_KeyDelay = 100

$keydown = 100

; Enter parameter on first screen and click 'Find'

WinActivate ( $glprod_window_name )

WinWaitActive ( $glprod_window_name )

opt("sendkeydelay" , $A_KeyDelay)

opt("sendkeydowndelay" , $keydown)

Send ( $bpa_number & '{TAB 9}')

sleep (1000)

Send ( $bpa_line & '{TAB 3}')

sleep (1000)

Send ( $buyer_name & '{TAB 4}')

Sleep (1000)

Send ( $part_number & '!j' )

thanks again.

Share this post


Link to post
Share on other sites
scatterjoy

Plus, we can investigate the clipget function.

Share this post


Link to post
Share on other sites
youknowwho4eva

$A_KeyDelay = 100

$keydown = 100

; Enter parameter on first screen and click 'Find'

WinActivate ( $glprod_window_name )

WinWaitActive ( $glprod_window_name )

opt("sendkeydelay" , $A_KeyDelay)

opt("sendkeydowndelay" , $keydown)

for $n = 1 to 9 step + 1

Send ( $bpa_number & '{TAB}')

sleep (1000)

next

for $n = 1 to 3 step + 1

Send ( $bpa_line & '{TAB}')

sleep (1000)

next

for $n = 1 to 4 step + 1

Send ( $buyer_name & '{TAB}')

Sleep (1000)

next

Send ( $part_number & '!j' )

Edit: well that should get you part the way there, you can figure it out from there. didn't think about it before i sent it

Edited by youknowwho4eva

Giggity

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  

×