When I used a single ControlSend() call to represent a keystroke, I found it did not work well. Adding explicit up/down calls with waits between seemed to do the trick for me.
Attached is your script, variant "H" with the 214 calls to ControlSend() in the script changed to use a custom key press function "FFSend" which I have tested in my own FF bots and had lots of success with, though I use an actual window handle and not the class-based lookup string you use. That is something you could try if this doesn't fix the problem.
I didn't test the attached bot, hope it runs and fixes the problem. Good luck^^
Edit: You may not need the 325ms wait at the end of the FFSend() function, since you appear to include a wait after each keystroke. I'd consider getting rid of those to clean up your code a bit, and just using the wait in FFSend.
Attached is your script, variant "H" with the 214 calls to ControlSend() in the script changed to use a custom key press function "FFSend" which I have tested in my own FF bots and had lots of success with, though I use an actual window handle and not the class-based lookup string you use. That is something you could try if this doesn't fix the problem.
I didn't test the attached bot, hope it runs and fixes the problem. Good luck^^
Edit: You may not need the 325ms wait at the end of the FFSend() function, since you appear to include a wait after each keystroke. I'd consider getting rid of those to clean up your code a bit, and just using the wait in FFSend.