Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Auto-Correct 2 capital letters in a word: WOrd ==> Word


  • Please log in to reply
34 replies to this topic
  • Guests
  • Last active:
  • Joined: --
Great script. Any chance of merging it with ShiftOff, which removes CapsLock if on when Shift is pressed? Works to fix tHE iVNVERSE cASE problem when some 'person' leaves CapsLock on....

luckyjoker
  • Members
  • 1 posts
  • Last active: Aug 13 2010 05:18 PM
  • Joined: 13 Aug 2010
The topic is very old, in a Mozilla-board I become the link to this place. I am sorry, but i must digging it out. I can not solve the problem alone.

This is my text now:

keys = ``=qwertyuiop\asdfghjklöäü'zxcvbnm
Loop Parse, keys
   HotKey ~+%A_LoopField%, Hoty        ; Shifted keys to monitor

keys = qwertyuiopasdfghjklzxcvbnmöäü
Loop Parse, keys
   HotKey ~%A_LoopField%, Normal       ; Unshifted keys to register as hotkeys

keys = ``-()=[]\:;',./
Loop Parse, keys
   HotKey ~%A_LoopField%, ~Space       ; Special chars to keep 2 capitals before

Hoty:
   CapCount := SubStr(A_PriorHotKey,2,1)="+" && A_TimeSincePriorHotkey<999 ? CapCount+1 : 1
   IfEqual CapCount,2, SendInput % "{BS}{"  SubStr(A_ThisHotKey,3,1) "}"
   IfEqual CapCount,3, SendInput % "{Left}{BS}+{" SubStr(A_PriorHotKey,3) "}{Right}"
Normal:
Return

~Shift Up::                            ; Handle CamelCase
   key0 := SubStr(A_PriorHotKey,2,1)="+" && A_TimeSincePriorHotkey<999 && CapCount=2
           ? SubStr(A_PriorHotKey,3) : ""
Return

~Space::                               ; Restore 2 capitals before special chars
   If (key0 <> "" && A_PriorHotKey = "~Shift Up" && A_TimeSincePriorHotkey<999)
      SendInput % "{Left}{BS}+{" key0 "}{Right}"
Return

And my question is: Why become I this: Cd" CdD when I press: shift + C + (pressing) D + no shift 2.
And:
How must I write the Space-key in the text, that it works correct?
TV is TV Tv Tv Tv Tv Tv Tv, can you see? Only one time is Tv (all time pressing shift + T + V + Space)
My english is now not great..I understand the comments not...a conversion had help me not too.

Thank you very much...

tilman
  • Members
  • 3 posts
  • Last active: Nov 11 2010 05:33 PM
  • Joined: 29 Oct 2010
Dear AHK friends,

I just found out that the AutoCorrect.ahk file (http://www.autohotke...AutoCorrect.ahk) includes this wonderful two consecutive capitals auto-correction script but that it is commented out by default. Indeed, like this it doesn't quite work well enough, as there are several problems with it, as has been discussed in this thread a long time ago. For me, this technical scripting is still too complicated (as I am a beginner), so I would like to ask you to take note below of my list of problems and then try to update/improve the code in the AutoCorrect.ahk file so that it works better and can be enabled by default.

Thanks!

Tilman


List of problems:

- Abbreviations (such as ) don't work
- There is no possibility to add manually words that should be ignored (for instance, there is a TV show called A-Plus or APlus. When I try to type it when the script is on, it gives me "A-plus" instead of "A-Plus" or sometimes even junk like "aAPlus").
- If I type this sentence fast, it changes the "I" to "i". Sometimes it also produces junk like "IfFI" although I try to write "If I".
- I am trying to write "P.S." at the end of an email but it changes it to "P.s."
- Common abbreviations used in Germany are "MfG" and "GmbH". Those obviously don't work either, as the script produces "Mfg" and "Gmbh" respectively.
- Doing some more random tests, if I try to write "FgFgFg", it changes to "FgfFFg".
- There might be more but at the moment this is all I can remember.

Endolith
  • Members
  • 14 posts
  • Last active: May 12 2015 03:47 PM
  • Joined: 18 Feb 2011

Also, I've made this section disabled by default because it sometimes causes unwanted corrections such as IfEqual->Ifequal


Why would it change that in the first place? Those aren't consecutive capitals. If it's changing that, then it's a bug that needs to be fixed.

Endolith
  • Members
  • 14 posts
  • Last active: May 12 2015 03:47 PM
  • Joined: 18 Feb 2011

Great script. Any chance of merging it with ShiftOff, which removes CapsLock if on when Shift is pressed? Works to fix tHE iVNVERSE cASE problem when some 'person' leaves CapsLock on....


Are they incompatible?