AutoItX3.Control--Controlsend("enter") doesn't work sometimes

I was trying to simulate keyboard event that press “Enter” everytime
after input. Sometimes it did not work since the browser did not
response. I want to know the reason for that error happens. Could any
folks help me, that will be great.

maybe timing issue?
I know I’ve used ffi to simulate keyboard stroke before: