I've added this to the script, but omitted autocorrection for digits and punctuation because I suspect they might do more harm than good (not sure). Also, I've made this section disabled by default because it sometimes causes unwanted corrections such as IfEqual->If
equal. (I think a lot of people use this script, so I'm trying to avoid addihng features unless they're reasonably certain to do more good than harm for the general public.)
I also changed the style of the code to be more conventional, namely to avoid IfEqual and implicit concatenation:
Code:
;-------------------------------------------------------------------------------
; The following section auto-corrects two consecutive capital letters in a word.
; For example, "WOrd" becomes "Word". It is disabled by default since it might
; cause unwanted corrections such as IfEqual->Ifequal. To enable it, remove
; the /*..*/ symbols from around it.
; This section is from Laszlo's script at http://www.autohotkey.com/forum/topic9689.html
;-------------------------------------------------------------------------------
/*
; The first line of code below is the set of letters, digits, and/or symbols
; that are eligible for this type of correction. Customize if you wish:
keys = abcdefghijklmnopqrstuvwxyz
Loop Parse, keys
HotKey ~+%A_LoopField%, Hoty
Hoty:
CapCount := SubStr(A_PriorHotKey,2,1)="+" && A_TimeSincePriorHotkey<999 ? CapCount+1 : 1
if CapCount = 2
SendInput % "{BS}" . SubStr(A_ThisHotKey,3,1)
else if CapCount = 3
SendInput % "{Left}{BS}+" . SubStr(A_PriorHotKey,3,1) . "{Right}"
Return
*/
Refinements are welcome. Thanks for the script.