Use the Sleep Command to Debug Intermittent Routines
Last night, I received the following comment from Thom Blake about last week’s blog “Auto-Capitalize the First Letter of Sentences” prompting this Quick Tip about adding the Sleep command at critical points in certain types of AutoHotkey routines:
Jack
Great script but I seem to have a problem with the capitalize a word function. It only works intermittently. The message box says “No text selected!” when clearly there is.
Thanks, Thom!
This is a needed reminder about a common problem when using the Send command with the Clipboard routine. Sometimes, for whatever reason, certain commands execute before the completion of the last action. In this case, AutoHotkey attempts to copy text to the Windows Clipboard before the SendInput text selection action completes: Continue reading