AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TypingAid v2.16b - Word AutoCompletion Utility
Goto page 1, 2, 3 ... 30, 31, 32  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
maniac



Joined: 28 Aug 2009
Posts: 267

PostPosted: Fri Jan 22, 2010 2:17 pm    Post subject: TypingAid v2.16b - Word AutoCompletion Utility Reply with quote

TypingAid is a simple, compact, and handy auto-completion utility.

It is customizable enough to be useful for regular typing and for programming.

Download:
TypingAid v2.16b

ArtWinAuto.com page (Link Broken. with compiled executables and alternative download links, may not be as up-to-date as this thread).

ArtWinAuto will eventually be hosting some customized preferences.ini files which with out-of-the-box support for many languages besides english.

Collection of WordLists (Link Broken)

English Wordlists:
1200 English Words Weighted By Frequency
2000 Common English Words
2000 Common English Words (Alternative)
3600 English Words
Large English Wordlist (Unfiltered, may contain curse words, etc)

AHK Keyword Wordlist:
http://www.autohotkey.net/~tidbit/WordList.txt (Thanks tidbit.)

Screenshots:


Change Log

Features:
As you type your word, up to 10 (or as defined in the Preferences file) matches will appear in a drop-down dialog, numbered 1 - 0 (10th). To choose the match you want just hit the associated number on your keyboard (numpad does not work). Alternatively you can select an item from the drop-down using the Up/Down arrows. You can define a fixed position for the drop-down dialog to appear by hitting Ctrl-Shift-H to open a small helper window, or by specifying a list of programs in the preferences file. Please note that in Firefox, Thunderbird, and certain other programs you will probably need to open the helper window due to issues detecting the caret position.

Words should be stored in a file named 'Wordlist.txt' which should be located in the script directory. These words may be commented out by prefixing with a semicolon or simply removed or added. Words may include terminating characters (such as space), but you must select the word before typing the terminating character.

In addition to being able to use the number keys to select a word, you can select words from the drop-down via the Up/Down arrows. Hitting Up on the first item will bring you to the last and hitting Down on the last item will bring you to the first. Hitting Page Up will bring you up 10 items, or to the first item. Hitting Page Down will bring you down 10 items, or to the last item. You can hit Tab, Right Arrow, Ctrl-Space, or Ctrl-Enter to autocomplete the selected word. This feature can be disabled or have some of its behavior modified via the Preferences file.

The script will learn words as you type them if LearnMode=On in the preferences file. If you type a word more than 5 times (or as defined in the preferences.ini file) in a single session the word will be added to the wordlist.txt file. Learned words are stored below the predefined words in the wordlist under a keyword called ;LEARNEDWORDS;. Learned words will always appear below predefined words, but will be ranked and ordered among other learned words based on the frequency you type them. You can permanently learn a word by highlighting a word and hitting Ctrl-Shift-C (this works even if LearnMode=Off). If you want to remove any learned words from your list you must manually remove them.
When LearnMode=On, entries in the wordlist file and learned words are limited to a length of 123 (or 61 when using Unicode AHK) characters due to internal workings.

The script will automatically create a file named preferences.ini in the script directory. This file allows for customization of the script.
Customizable features include:
  • List of programs for which you want TypingAid enabled.
  • List of programs for which you do not want TypingAid enabled.
  • Number of characters before the list of words appears.
  • Number of times you must press a number hotkey to select the associated word (options are 1 and 2, 2 has had minimal testing).
  • Enable or disable learning mode.
  • Number of times you must type a word before it is permanently learned.
  • Number of characters a word needs to have in order to be learned.
  • List of strings which will prevent any word which contains one of these strings from being learned.
  • Enable, disable, or customize the arrow key's functionality.
  • Disable certain keys for autocompleting a word selected via the arrow keys.
  • Enable or disable the resetting of the List Box on a mouseclick.
  • Change whether the script simply completes or actually replaces the word (capitalization change based on the wordlist file)
  • Change whether a space should be automatically added after the autocompleted word or not.
  • Change the method used to send the word to the screen.
  • List of characters which terminate a word.
  • List of characters which terminate a word and start a new word.
  • List of programs for which you want the Helper Window to automatically open.
  • Number of pixels below the caret to display the List Box.
  • List Box Default Font of fixed (Courier New) or variable (Tahoma) width.
  • List Box Default Font override.
  • List Box Font Size.
  • List Box Character Width to override the computed character width.
  • List Box Opacity setting to set the transparency of the List Box.
  • List Box Rows to define the number of items to show in the list at once.


Unicode Support:
Full (untested) for UTF-8 character set.
AHK_L is required.

Known Issues:
  • The caret position cannot be detected in certain applications, such as FireFox, OpenOffice.org, and Thunderbird. As a workaround for this the drop-down will open at the last position you clicked with your mouse, or you can open a helper window by hitting Ctrl-Shift-H.
  • There are problems correctly handling dead keys like `" in certain keyboard layouts where they are used to type accented characters.
  • Similar to the above, Chinese/Japanese IME (and any other languages which operate by changing characters) input will have issues.
  • Occasionally the program might fail to delete one or two characters during autocompletion. There are 2 reasons for this - A. It is possible to type fast enough that the script misses keys. B. I have noticed that sometimes the script attempts to send the right number of backspaces, but the active window doesn't receive all of them. Changing the SendMethod in the Preferences.ini file may address this.
  • Some computers have had issues with SendMethod=1 not sending any characters. Try a different SendMethod if you have problems.
  • SendMethod=1 is unable to send characters which do not exist on your keyboard layout. Try switching to a different SendMethod in the Preferences.ini file if you find that you are unable to autocomplete certain characters.
  • With CAPS lock on, if you hit the Up/Down arrow to change lines and begin typing, the first character you type will not be capitalized on some machines.
  • If using an On-Screen Keyboard, please disable DetectMouseClickMove or the word will be reset while typing.
  • If you have changed the Font DPI in windows there may be issues calculating the width of the List Box, this can be addressed via the ListBoxCharacterWidth parameter in the Preferences.ini file.
  • When NumPresses=2, numbers aren't learned when there are items to autocomplete, but the number is only hit once.
  • Running another script in conjunction with TypingAid can cause extra characters to be typed occasionally (possible fix via I parameter to Input command, http://www.autohotkey.com/forum/viewtopic.php?p=377459#377459).
  • When Colemak v1.1 is the default keyboard layout on Windows 7 (and possibly XP or Vista, but untested), using ` and ~ as endkeys map to R and G respectively; so R and G terminate the word. Reported here. This can be worked around by removing ` and ~ from the "TerminatingCharacters" value in the Preferences.ini file and adding them to "ForceNewWordCharacters" (note the word you type following this character will not be learned).


Future Features:

Credits:
Jordi S
Maniac
HugoV
kakarukeys
Asaptrad


Original Thread


Last edited by maniac on Mon Dec 12, 2011 11:51 am; edited 64 times in total
Back to top
View user's profile Send private message
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Fri Jan 22, 2010 2:59 pm    Post subject: Reply with quote

Added to wiki listing below the other two Intellisense scripts http://www.autohotkey.com/wiki/index.php?title=Script_Listing#Editors
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Fri Jan 22, 2010 3:18 pm    Post subject: Reply with quote

Feature suggestion:

- Pressing del (or ^del) while in tooltip window on selected > word will delete that word/sentence from wordlist.txt
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
maniac



Joined: 28 Aug 2009
Posts: 267

PostPosted: Fri Jan 22, 2010 3:41 pm    Post subject: Reply with quote

Thanks for adding it to the wiki.

hugov wrote:
Feature suggestion:

- Pressing del (or ^del) while in tooltip window on selected > word will delete that word/sentence from wordlist.txt


I'm not sure that would be a good idea for a few reasons:
A. Couldn't pop up a confirmation without being disruptive - accidental deletes would be hard to recover from.
B. I don't think words will need to be deleted very often, due to that I would prefer the deliberate action of actually being forced to modify the wordlist.txt file directly.

Plus it'd be a bit more of a pain to code since it can't plug directly into the learning code Wink.
Back to top
View user's profile Send private message
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Fri Jan 22, 2010 4:12 pm    Post subject: Reply with quote

I still think it could be useful, especially if you frequently mistype words (dyslectics of the world untie) it might get added to the learned words. Of course it is easy to edit the wordslist file but still... perhaps something as "mark for deletion" so the next time the user starts typingaid it will ask are you sure, or when exiting the program, that way it doesn't get in the way as such. Not a huge feature but something that could be added in TA version 7.3 or something Wink
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
arsan



Joined: 02 Jan 2010
Posts: 105

PostPosted: Sat Jan 23, 2010 6:19 am    Post subject: Reply with quote

This is a useful tool. Thanks.
Back to top
View user's profile Send private message
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Sat Jan 23, 2010 8:00 am    Post subject: Re: TypingAid v2.0 - Word AutoCompletion Utility Reply with quote

Some ideas on Known Issues:
maniac wrote:

[*]If you move the cursor within the same line with the mouse and resume typing, the word will not reset.

Possible solution: Use MouseGetPos to check mouse position, once it moves clear word + tooltip (edit: or perhaps monitor mouseclicks)
Quote:
[*]The caret position cannot be detected in certain applications, such as FireFox, OpenOffice.org, and Thunderbird. As a workaround for this the drop-down will open at the last position you clicked with your mouse, or you can open a helper window by hitting Ctrl-Shift-H.
Possible solutions:
- would be interesting to see if you indeed could use ACC or COM to get the caret position (see http://www.autohotkey.com/forum/topic24234-15.html don't know how ACC/COM works so can't help)
- If caret is 0,0 it means can't get correct value so you could show the helper window automatically (configurable, remember last position so the user doesn't have to move it 'every' time)
- OR still not accurate but closer to the caret position: use ControlGetFocus / ControlGetPos to get the X,Y of the control and either position helper window or the regular tooltip window somewhere in the control with an offset but that probably doesn't help much ...

Edit: Some guy got the caret position to work with firefox he said here http://www.codeproject.com/KB/dialog/CaretPosition.aspx?msg=3211164#xx3211164xx thanks to complx http://www.autohotkey.com/forum/viewtopic.php?t=53639 so there might be hope yet ...
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
Laszlo



Joined: 14 Feb 2005
Posts: 4710
Location: Boulder, CO

PostPosted: Sat Jan 23, 2010 6:24 pm    Post subject: Reply with quote

Here is a much simpler typing aid script. Maybe you could combine the ideas.
Back to top
View user's profile Send private message
maniac



Joined: 28 Aug 2009
Posts: 267

PostPosted: Mon Jan 25, 2010 12:02 pm    Post subject: Re: TypingAid v2.0 - Word AutoCompletion Utility Reply with quote

hugov wrote:
Some ideas on Known Issues:
maniac wrote:

[*]If you move the cursor within the same line with the mouse and resume typing, the word will not reset.

Possible solution: Use MouseGetPos to check mouse position, once it moves clear word + tooltip (edit: or perhaps monitor mouseclicks)

It's more complicated than that. What if you are in a small edit box and you click to the left of that box on the same line? You may not have changed the cursor position.

One thing I tried was tracking the old horizontal caret position and comparing it, but I ran into several issues with that.

hugov wrote:
Possible solutions:
- would be interesting to see if you indeed could use ACC or COM to get the caret position (see http://www.autohotkey.com/forum/topic24234-15.html don't know how ACC/COM works so can't help)
- If caret is 0,0 it means can't get correct value so you could show the helper window automatically (configurable, remember last position so the user doesn't have to move it 'every' time)
- OR still not accurate but closer to the caret position: use ControlGetFocus / ControlGetPos to get the X,Y of the control and either position helper window or the regular tooltip window somewhere in the control with an offset but that probably doesn't help much ...

Edit: Some guy got the caret position to work with firefox he said here http://www.codeproject.com/KB/dialog/CaretPosition.aspx?msg=3211164#xx3211164xx thanks to complx http://www.autohotkey.com/forum/viewtopic.php?t=53639 so there might be hope yet ...


Thanks, I'll have to look into those at some point. One thing I was hoping to implement was a way to remember the old helper window position (but I haven't tried to figure out how to get the window position when the helper is closed).

Laszlo wrote:
Here is a much simpler typing aid script. Maybe you could combine the ideas.

I like the ListBox Gui... that would be ideal to switch to.
Back to top
View user's profile Send private message
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Mon Jan 25, 2010 12:34 pm    Post subject: Re: TypingAid v2.0 - Word AutoCompletion Utility Reply with quote

maniac wrote:
One thing I was hoping to implement was a way to remember the old helper window position (but I haven't tried to figure out how to get the window position when the helper is closed).

here you go
Code:
;Create helper window for showing tooltip
CreateHelperWindow()
{
   Global Helper_id
   IniRead, XY, Preferences.ini, HelperWindow, XY
   StringSplit, Pos, XY, `,
   Gui, Add, Text,,Tooltip appears here
   Gui, Show, X%Pos1% Y%Pos2%
   WinGet, Helper_id, ID,,Tooltip appears here
   WinSet, AlwaysOnTop, On, ahk_id %Helper_id%
   return
}

GuiClose:
SaveHelperWindowPos(Helper_id)
Return

SaveHelperWindowPos(Helper_id)
{
   WinGetPos, hX, hY, , , ahk_id %Helper_id%
   IniWrite, %hX%`,%hY%, Preferences.ini, HelperWindow, XY
   Gui, Hide
}
add this to preferences.ini
Code:
[HelperWindow]
XY=200,277
It will remember the position between sessions. If you skip the INI part it will of course remember only per session and you have to make the X & Y pos global.

Do you want me to have a go at the listbox?
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
maniac



Joined: 28 Aug 2009
Posts: 267

PostPosted: Mon Jan 25, 2010 2:22 pm    Post subject: Reply with quote

Hey hugov, thanks. I added the Helper Window position save code with a small modification... I only read the ini file when launching the script and save it when exiting. 2.01 is now uploaded.

Feel free to try the listbox Smile. I assume you would be planning on simply switching over the "look" from the tooltip to the listbox rather than actually changing any functionality?
Back to top
View user's profile Send private message
maniac



Joined: 28 Aug 2009
Posts: 267

PostPosted: Mon Jan 25, 2010 2:35 pm    Post subject: Reply with quote

Also, would people find it useful to be able to increase the minimum length a word must be to learn the word without having to change the number of letters you have to type to pop up the wordlist?

IE at the default settings the script will learn both "come" and "communications", but the autocomplete is obviously much more useful for "communications" than "come".
What do you guys think?
Back to top
View user's profile Send private message
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Mon Jan 25, 2010 2:45 pm    Post subject: Reply with quote

maniac wrote:
Also, would people find it useful to be able to increase the minimum length a word must be to learn the word without having to change the number of letters you have to type to pop up the wordlist?

IE at the default settings the script will learn both "come" and "communications", but the autocomplete is obviously much more useful for "communications" than "come".
What do you guys think?
The idea is to save keystrokes so a simple standard formula:

Length + 2 = new word to be added to the list

Little use to add come to the list if you have set the length variable to 3 but comet would save you 1 keystroke, perhaps another config option Smile

Re listbox: yep same as now. I already made the 'endless scrolling' (cycle) for a listbox a while back http://www.autohotkey.com/forum/topic31618.html
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
maniac



Joined: 28 Aug 2009
Posts: 267

PostPosted: Mon Jan 25, 2010 2:55 pm    Post subject: Reply with quote

hugov wrote:
The idea is to save keystrokes so a simple standard formula:

Length + 2 = new word to be added to the list

Little use to add come to the list if you have set the length variable to 3 but comet would save you 1 keystroke, perhaps another config option Smile

Yeah, that's what I was thinking... length+2 as default, then add a parameter to control it.


hugov wrote:
Re listbox: yep same as now. I already made the 'endless scrolling' (cycle) for a listbox a while back http://www.autohotkey.com/forum/topic31618.html

Sounds good, I just hope it draws as fast as a tooltip or it won't work well enough.
Back to top
View user's profile Send private message
maniac



Joined: 28 Aug 2009
Posts: 267

PostPosted: Mon Jan 25, 2010 3:16 pm    Post subject: Reply with quote

maniac wrote:

Yeah, that's what I was thinking... length+2 as default, then add a parameter to control it.


Done, 2.02 uploaded. You can still force learn a word (ctrl-shift-c), so long as it's longer than "Length".
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page 1, 2, 3 ... 30, 31, 32  Next
Page 1 of 32

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group