AutoHotkey Community

It is currently May 27th, 2012, 3:56 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: August 5th, 2009, 10:31 am 
Great script. Any chance of merging it with ShiftOff, which removes CapsLock if on when Shift<KEY> is pressed? Works to fix tHE iVNVERSE cASE problem when some 'person' leaves CapsLock on....


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 13th, 2010, 6:23 pm 
Offline

Joined: August 13th, 2010, 6:16 pm
Posts: 1
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:

Code:
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...


Report this post
Top
 Profile  
Reply with quote  
PostPosted: October 29th, 2010, 2:52 pm 
Offline

Joined: October 29th, 2010, 1:44 pm
Posts: 1
Location: Finland
Dear AHK friends,

I just found out that the AutoCorrect.ahk file (http://www.autohotkey.com/download/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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 18th, 2011, 5:40 pm 
Offline

Joined: February 18th, 2011, 5:39 pm
Posts: 12
Chris wrote:
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 12th, 2011, 5:10 pm 
Offline

Joined: February 18th, 2011, 5:39 pm
Posts: 12
Anonymous wrote:
Great script. Any chance of merging it with ShiftOff, which removes CapsLock if on when Shift<KEY> is pressed? Works to fix tHE iVNVERSE cASE problem when some 'person' leaves CapsLock on....


Are they incompatible?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Leef_me and 37 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group