@dev: I think this new SendFull() will work for you. Just do the same as before, open includes\sending.ahk and replace the entire SendFull() function with the one below. Save, and of course reload TA. I tried with all 7 sendmethods, for me only 2c seemed to fail, the others worked.
Code:
SendFull(SendValue,BackSpaceLen)
{
; Modified SendFull() function for dev @ autohotkey forum Typing Aid 2.16b
; version: 2, date: 7-12-2011 8:16pm, author: that guy who also made the preferences Gui ;-)
; NOTE: Does not seem to work with SendMethod=2C, tested successfully with all the other 6 SendMethods, but ymmv
; "Install": by editing includes\sending.ahk and replace the SendFull() function you see there with this one
; Purpose:
; With this mod you can store words in your wordlist.txt including an abbreviation by using a | char like so
;
; abbrev|Full Text
; abbr|LengthyWord
; NormalWord
; OtherNormalWord
; short|longversion
; etc
global SendMethod
global A_id
global NoBackSpace
global AutoSpace
StoreNoBackSpace:=NoBackSpace
If (InStr(SendValue, "|") > 0)
{
Cut:=InStr(SendValue,"|")+1
SendValue:=SubStr(SendValue,Cut)
sending .= "{BS " . BackSpaceLen . "}"
NoBackSpace=Off
}
IfNotEqual, NoBackSpace, Off
StringTrimLeft, SendValue, SendValue, %BackSpaceLen%
; if autospace is on, add a space to the string to send
IfEqual, AutoSpace, On
SendValue .= A_Space
IfEqual, SendMethod, 1
{
; Shift key hits are here to account for an occassional bug which misses the first keys in SendPlay
sending = {Shift Down}{Shift Up}{Shift Down}{Shift Up}
IfEqual, NoBackSpace, Off
sending .= "{BS " . BackSpaceLen . "}"
sending .= "{Raw}" . SendValue
SendPlay, %sending% ; First do the backspaces, Then send word (Raw because we want the string exactly as in wordlist.txt)
NoBackSpace:=StoreNoBackSpace
Return
}
IfEqual, NoBackSpace, Off
sending = {BS %BackSpaceLen%}{Raw}%SendValue%
Else sending = {Raw}%SendValue%
IfEqual, SendMethod, 2
{
SendInput, %sending% ; First do the backspaces, Then send word (Raw because we want the string exactly as in wordlist.txt)
NoBackSpace:=StoreNoBackSpace
Return
}
IfEqual, SendMethod, 3
{
SendEvent, %sending% ; First do the backspaces, Then send word (Raw because we want the string exactly as in wordlist.txt)
NoBackSpace:=StoreNoBackSpace
Return
}
ClipboardSave := ClipboardAll
Clipboard =
Clipboard := SendValue
ClipWait, 0
IfEqual, NoBackSpace, Off
sending = {BS %BackSpaceLen%}{Ctrl Down}v{Ctrl Up}
Else sending = {Ctrl Down}v{Ctrl Up}
IfEqual, SendMethod, 1C
{
sending := "{Shift Down}{Shift Up}{Shift Down}{Shift Up}" . sending
SendPlay, %sending% ; First do the backspaces, Then send word via clipboard
} else {
IfEqual, SendMethod, 2C
{
SendInput, %sending% ; First do the backspaces, Then send word via clipboard
} else {
IfEqual, SendMethod, 3C
{
SendEvent, %sending% ; First do the backspaces, Then send word via clipboard
} Else {
ControlGetFocus, ActiveControl, ahk_id %A_id%
IfNotEqual, ActiveControl,
ControlSend, %ActiveControl%, %sending%, ahk_id %A_id%
}
}
}
Clipboard := ClipboardSave
NoBackSpace:=StoreNoBackSpace
Return
}
Let me know how the above goes. And do upgrade your ahk to the latest basic version, that will solve your listlines problem as well.
(If you wish it should be possible to remove the abbreviation from the words you see, although that might be a bit counter intuitive because the abbreviation might have different letters as to what you are seeing in the list.)