Code: Select all
The problem makes keys like Ctrl and Shift behave weirdly in other programs while the keypresses are done in the background.
If you cannot run the script yourself, I will show you what the problem looks like. On the next row, I will start typing the word 'Shift' over and over again, at the start of every word I will hold down shift and at the end of the word I will release it and re-press it. This is done while the script and loop is running:
SHift SHIft shift shift Shift Shift Shift shift shift Shift Shift SHift SHift SHIft shift shift SHift shift shift Shift SHift SHift SHIft Shift shift SHift
As you can see sometimes it never registers the shift press, sometimes just stops half-way even though I am still holding it down. The weird key behavior happens while typing both IN the window that the script is sending keypresses and also in other windows.
I also know that this problem is not occurring only to me as I shared this script with someone else and he had the same problem. I am running 64-bit Windows 7, even though that probably doesn't matter.