Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

AutoReplace


  • Please log in to reply
50 replies to this topic
Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

I promised some time ago to update this... List is now all merged into one, 4598-item long list. Total file is 5469 lines long, 134k. www.autohotkey.net/~anonymous/AutoCorre ... orrect.ahk

There is stil the above list of interesting things to code for it, but I have at least got the incredibly tedious merging part out the way. Huzzah!

Great work on the merging! Although it must have been many hours of tedium, it's likely that hundreds will benefit.

I also like your fix for -ign to become -ing, and your new feature "word endings". I notice you already have the following word endings:
:?:bilites::bilities
:?:bilties::bilities
As a further improvement, would it be possible to add the following without causing ambiguity/overlap with any legitimate English words?:
:?:blity::bility
:?:blities::blities
If so, it would make obsolete all of the following (and possibly correct many new words not yet in the list):
::availablity::availability
::compatiblity::compatibility
::compatiblities::compatibilities
::incompatiblity::incompatibility
::incompatiblities::incompatibilities
::possiblity::possibility
::possiblities::possibilities
::reliablity::reliability
::responsiblity::responsibility
::responsiblities::responsibilities
Until a decision is made, I've added ::responsiblities::responsibilities (it will be obsolete if the new endings are okay). I also removed ::responsibilites::responsibilities due to it being covered by an existing word ending.

I like your btu->but replacement. I added the second line below as a possible further improvement (it uses semicolon instead of comma):
:?:, btu::, but ; Not just replacing "btu", as that is a unit of heat.
:?:; btu::; but
I moved and changed:
::supercede::supersede
::superceeded::superseded
...to become word beginnings as:
:*:supercede::supersede
:*:superceed::supersede
...because it gives broader coverage (e.g. supercedes->supersedes). I suspect there are many other cases that could be similarly simplified, but that is probably a job for another day (perhaps you could put it on your to-do list as a low priority).

Was there any reason to omit the following?:
;-------------------------------------------------------------------------------
;  Capitalise dates
;-------------------------------------------------------------------------------
::monday::Monday
::tuesday::Tuesday
::wednesday::Wednesday
::thursday::Thursday
::friday::Friday
::saturday::Saturday
::sunday::Sunday 

::january::January
::february::February
::march::March
::april::April
; ::may::May  ; Disabled because it matches the common word "may".
::june::June
::july::July
::august::August
::september::September
::october::October
::novemeber::November
::december::December
I temporarily put them back in, but we can discuss pro's and con's.

I removed the following settings:
- Unnecessary for .ahk files: #AllowSameLineComments
- Already in effect due to presence of hotstrings: #Persistent
- Doesn't do anything for hotstrings (they already use SendInput by default): SendMode Input

I temporarily removed the following because I don't fully understand the pro's and con's. Maybe we can discuss:
#HotString nomouse
#Hotstring EndChars `n `t

I updated the following section to use a sneaky method that avoids replacing words with exact versions of themselves:
;------------------------------------------------------------------------------
; Fix for -ign instead of -ing.
; Words to exclude: (could probably do this by return without rewrite)
; From: http://www.morewords.com/e nds-with/gn/
;------------------------------------------------------------------------------
[color=red]#Hotstring B0  ; Turns off automatic backspacing for the following hotstrings.[/color]
::align::
::antiforeign::
::arraign::
::assign::
::benign::
::campaign::
::champaign::
::codesign::
::coign::
::condign::
::consign::
::coreign::
::cosign::
::countercampaign::
::countersign::
::deign::
::deraign::
::design::
::eloign::
::ensign::
::feign::
::foreign::
::indign::
::malign::
::misalign::
::outdesign::
::overdesign::
::preassign::
::realign::
::reassign::
::redesign::
::reign::
::resign::
::sign::
::sovereign::
::unbenign::
[color=red]return  ; This makes the above hotstrings do nothing so that they override the ign->ing rule below.[/color]

[color=red]#Hotstring B  ; Turn back on automatic backspacing for all subsequent hotstrings.[/color]
:?:ign::ing
Here's the revised script under its new filename (not yet published publicly): www.autohotkey.com/download/AutoCorrect.ahk

Finally, I can see that you updated and reorganized the info in the header. It looks much nicer now. Feel free to credit yourself somewhere because you've made some huge improvements.

Thanks for all your hard work. This has really become a great auto-correct script!

UPDATE: After testing the new version for a few weeks, I've replaced the old version with the new one at www.autohotkey.com/download/OtherDownloads.htm

RJFerret
  • Guests
  • Last active:
  • Joined: --
Sorry to necro-post but I had to add:

#Hotstring SI ; SendInput so typing doesn't intersperse

So when I typed things like "aesop fables" it didn't come out as "fÆsop ables" or worse!

-Randy

RJFerret
  • Guests
  • Last active:
  • Joined: --
So SendInput worked better (stopped the interspersed typing) but created a new problem, the backspacing seems to go too far sometimes or in the wrong place (so I tried changing it to SendPlay but that behaved identically).

I end up with things like "together unthe teh" (with two spaces between "the" and "teh") instead of "together under the".

Any suggestions? Thanks!

-Randy

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005
AHK’s hotstring processing has limitations. One is speed/interference with user typing. Sometimes setting “Process Priority,,R” (real time process) helps.

The other limitation is the inability to react to script generated keystrokes. If you have a keyboard manager, which sends keys in place of others, or changes the case of typed letters, no hotsring sees those changes. This prevents AutoCorrect to be used with this type of scripts.

TestPilot
  • Members
  • 52 posts
  • Last active: May 05 2010 07:06 PM
  • Joined: 26 Jun 2007
Hey, I was using AutoWikiBrowser software and noticed it find and replace LOTS of misspellings that not corrected by current version of AutoHotkey AutoCorrect script I use on my PC. And all those misspellings were found in real life Wikipedia articles. I give you few examples:

varoius → various
manuvers → maneuvers
uncomfirmed → unconfirmed
reseach → research
orphange → orphanage
protray → portray

You can test popularity of any misspelling by doing Google test: if Google finds more then 50 000 pages with of misspelled word and suggest correct spelling - then it might be worth of adding rule for particular misspelling.

But there is a problem - program are using regular expressions to do auto corrections. It is so called RegExTypoFix: http://en.wikipedia.... ... gExTypoFix

You can see rules base at: http://en.wikipedia.... ... wser/Typos

Could those corrections possibly be embedded into current script?

And last but not least: current version are fixing "wanna" with "want to". This is ridiculous - you could not in a right mind misspell one with another. It is always a matter of persons choice. With such logic script writer can make "ass"->"butt" rule. But I do think such force correcting someones styling choices with software that advertise itself as typos corrector is a plain wrong. I know, scrips saying in a comments: "Some entries ... are clearly a matter of deliberate personal writing style (wanna, colour)" But it is still keep correcting it :evil: That is suxx :(

ehh
  • Guests
  • Last active:
  • Joined: --
[quote]And last but not least: current version are fixing "wanna" with "want to". This is ridiculous - you could not in a right mind misspell one with another. It is always a matter of persons choice. [/quote]

you can edit the script to fit your needs can't you? you said it yourself, it's a matter of choice. :roll: [/quote]

daonlyfreez
  • Members
  • 995 posts
  • Last active: Jan 23 2013 08:16 AM
  • Joined: 16 Mar 2005
(Especially the second posting in) this thread might interest users of this script:

German/English and vice versa Spelling and Translation Files
Posted Image mirror 1mirror 2mirror 3ahk4.me • PM or Posted Image

TestPilot
  • Members
  • 52 posts
  • Last active: May 05 2010 07:06 PM
  • Joined: 26 Jun 2007

you can edit the script to fit your needs can't you? you said it yourself, it's a matter of choice. :roll:

Sure I edited that out. But it is still not nice to include that correction into default version of the script.

Don't get me wrong - it is an excellent script that really helps, and AHK is awesome program that helps me save time on daily basis plus make my Internet browsing experience fun :p Big respect to anyone involved in AHK/scripts creation.

I wish I can modify AutoCorrect script myself to include those regular expressions, instead of begging here :roll: But I might try to read docs and rewrite AutoCorrect tomorrow :twisted: Not sure if I succeed :oops:

TestPilot
  • Members
  • 52 posts
  • Last active: May 05 2010 07:06 PM
  • Joined: 26 Jun 2007
Ahh, script looks too cryptic for me...

Btw, if regexp base could be included then AHK script would fix typos in quite a few languages - there are 7 language versions so far on wiki.

TestPilot
  • Members
  • 52 posts
  • Last active: May 05 2010 07:06 PM
  • Joined: 26 Jun 2007
Ok I made it :oops:
2200 typofixing regular expressions included :p
It is not perfect, so I need someone to betatest and possibly optimize it. Preferably someone with AutoCorrect experience.

TestPilot
  • Members
  • 52 posts
  • Last active: May 05 2010 07:06 PM
  • Joined: 26 Jun 2007
Regex based typo fixing script - I started new topic about it: http://www.autohotke...pic.php?t=29733

DeWild1
  • Members
  • 369 posts
  • Last active: Feb 28 2014 08:15 PM
  • Joined: 30 Apr 2006
Please do not give me any credit for this but,,,
Please add this to the top of autocorrect.
Process Priority,,R
menu, tray, NoStandard
Menu, tray, add 
Menu, tray, add, AutoCorrect ON, MenuHandler
Menu, tray, add 
Menu, tray, add, AutoCorrect OFF, MenuHandler1 
Menu, tray, add  
Menu, tray, add, Exit, MenuHandler2 
Gosub, MenuHandler 
return


and this to the bottom..

MenuHandler:
Menu, Tray, Icon, shell32.dll, 74, 1
TrayTip, Auto Correct,
(

Auto Correct is ON

This program will automatically make spelling corrections for you.
If you are having trouble with it, right click on the below icon and turn it off.
), , 7
Suspend, off
return

MenuHandler1:
Menu, Tray, Icon, shell32.dll, 110, 1
TrayTip, Auto Correct,
(

Auto Correct is OFF

), , 3

Suspend, on

return

MenuHandler2:
exitapp
return

It makes it more user freindly and adds Laszlo's realtime CPU..

poirmw
  • Guests
  • Last active:
  • Joined: --
In what sense do your two modifications to AutoCorrect make things more "...user friendly"? I don't quite see what added benefit(s) your modifications bring to the original script. Typos are automatically corrected without your modifications. What is it that I am missing?

DeWild1
  • Members
  • 369 posts
  • Last active: Feb 28 2014 08:15 PM
  • Joined: 30 Apr 2006

In what sense do your two modifications to AutoCorrect make things more "...user friendly"? I don't quite see what added benefit(s) your modifications bring to the original script. Typos are automatically corrected without your modifications. What is it that I am missing?

Its just for the average user to see a tray icon that allows then to stop it if it causes problems, (rare, but i use it everyday so I see it happen), and an easy way for them to exit, Start and Stop it..
It's a small addition that brings the power of this script to an easy to understand Start and Stop.
That's all. People here would never appreciate it, people not from here would.

I deal with the average Joe every day so I am a little bit empathetic to them.

susiles
  • Guests
  • Last active:
  • Joined: --
All,

I have been using this great script very successfully in the past. In the last weeks though, they have become unstable (no change to the computer or system, this effect shows up also with two different keyboards, wired and wireless). Even a totally clean new install of XP doesn't help, neither does an exchange of the keyboard from wireless USB to a wired PS/2 keyboard. Here is the problem:

I created a hotstring which sends "you" after entering "u". Normally the right behaviour gets fired, but in about 1 out of 20 cases, I am getting "uyou" instead.

Another example is a hotkey which transforms "thats" into "that's", where in 1 out of 20 cases, I am getting a "tthat's".

Has anybody encountered this strange problem?

Thank you very much
Susi