AutoHotkey Community

It is currently May 27th, 2012, 1:54 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 494 posts ]  Go to page 1, 2, 3, 4, 5 ... 33  Next
Author Message
PostPosted: January 22nd, 2010, 3:17 pm 
Offline

Joined: August 28th, 2009, 3:00 pm
Posts: 275
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:
Image

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/viewtop ... 459#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 May 14th, 2012, 2:41 pm, edited 65 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2010, 3:59 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
Added to wiki listing below the other two Intellisense scripts http://www.autohotkey.com/wiki/index.ph ... ng#Editors

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2010, 4:18 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
Feature suggestion:

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

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2010, 4:41 pm 
Offline

Joined: August 28th, 2009, 3:00 pm
Posts: 275
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 ;).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2010, 5:12 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
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 FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 23rd, 2010, 7:19 am 
Offline

Joined: January 2nd, 2010, 6:13 pm
Posts: 105
This is a useful tool. Thanks.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: January 23rd, 2010, 9:00 am 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
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/Ca ... x3211164xx thanks to complx http://www.autohotkey.com/forum/viewtopic.php?t=53639 so there might be hope yet ...

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 23rd, 2010, 7:24 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
Here is a much simpler typing aid script. Maybe you could combine the ideas.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: January 25th, 2010, 1:02 pm 
Offline

Joined: August 28th, 2009, 3:00 pm
Posts: 275
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/Ca ... x3211164xx 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.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: January 25th, 2010, 1:34 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
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 FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 25th, 2010, 3:22 pm 
Offline

Joined: August 28th, 2009, 3:00 pm
Posts: 275
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 :). I assume you would be planning on simply switching over the "look" from the tooltip to the listbox rather than actually changing any functionality?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 25th, 2010, 3:35 pm 
Offline

Joined: August 28th, 2009, 3:00 pm
Posts: 275
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 25th, 2010, 3:45 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
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 :-)

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 FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 25th, 2010, 3:55 pm 
Offline

Joined: August 28th, 2009, 3:00 pm
Posts: 275
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 :-)

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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 25th, 2010, 4:16 pm 
Offline

Joined: August 28th, 2009, 3:00 pm
Posts: 275
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".


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 494 posts ]  Go to page 1, 2, 3, 4, 5 ... 33  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], Relayer, Yahoo [Bot] and 15 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