ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

AutoHotKey text replacement question

(1/2) > >>

kyrathaba:
I belong to a forum where a lot of amateur writers gather. They're wanting a script that will catch misspellings as they type. I'm developing a simple script that replaces the wrong wording with the correct wording. For example:

::good advise::good advice

The above works flawlessly: as soon as a user types "good advise" it gets changed by the script to "good advice" and the user just keeps on typing.

I want the script to detect anytime the writer types the article 'a' and the next word begins with a vowel. In that case, I want the script to change 'a' to 'an'. So, below shows what the author types and then after the arrow I show the correction made by the script:

a otter -> an otter

a icycle -> an icycle

Any help would be appreciated.

lanux128:
@kyrathaba: If you're using Autohotkey to develop the auto-correct script, you can look up Hotstrings.


for starters, you can use something like this below though it is not accurate due to examples such as "an umbrella" vs. "a university".


--- Code: Autohotkey ---:*:a a::an a:*:a e::an e:*:a i::an i:*:a o::an o:*:a u::an u

kyrathaba:
Thanks, Lanux!

MilesAhead:
@kyrathaba: If you're using Autohotkey to develop the auto-correct script, you can look up Hotstrings.


for starters, you can use something like this below though it is not accurate due to examples such as "an umbrella" vs. "a university".

-lanux128 (June 28, 2015, 12:53 AM)
--- End quote ---

Also "a hour"

kyrathaba:
Thanks, MilesAhead. Good catch! I'll add that in my script.

Navigation

[0] Message Index

[#] Next page

Go to full version