ManiacDC / TypingAid

Word AutoCompletion Utility
http://www.autohotkey.com/board/topic/49517-ahk-11typingaid-v2200-word-autocompletion-utility/
GNU General Public License v3.0
138 stars 45 forks source link

Interactions between hotstring and TypingAid #92

Open CardioDoc opened 6 years ago

CardioDoc commented 6 years ago

I use some hotstrings in autoHotkey (example: ::echo::echocardiogram), next to phrase-expanding from TypingAdd (sentences like 'Echocardiogram shows......."). As shown, some of these longer phrases start of with a shorter word that is used as a hotstring. This results in the strange situation that, after selecting the longer phrase, the keystrokes of echo are also executed (translated to the hotstring echocardiogram). The resulting output will then be: 'Echocardiogram shows.......echocardiogram").

Questions:

  1. How can I prevent the execution of the hotstring after an TypingAdd insertion.
  2. How to prevent typing add from providing suggestions when words start with a prefix (for example "/" )

Thanks in advance for the help

ManiacDC commented 6 years ago
  1. I think you have to move your hotstrings into the TypingAid main program, rather than run 2 separate scripts? I don't really use hotstrings so I'm not sure.

  2. I think setting "/" as a Force New Word Character in Advanced will do what you want? I think you may also need to remove it from the Terminating Characters list.

CardioDoc commented 6 years ago

Thanks Maniac for you reply. I tried both your suggestions, unfortunately they did not work. Could you suggest where (what linenumber) to put the hotstrings into your code. I tried with using #include with the hotstrings in a separate file. No luck.

AlexFainshtein commented 6 years ago

I think, Maniac does not suggest to modify his code, but simply use the functionality of TypingAid to achieve what you need. In particular, he suggested adding adding forward slash in the second box and removing it from the first:

image

CardioDoc commented 6 years ago

Thanks Alex. I did understand and tried Maniac's suggestion regarding the forward slash. However, this did not resolve the problem.

ManiacDC commented 6 years ago

@CardioDoc I don't know, I haven't used hotstrings with the program. You can try reading through the old forum threads as I'm pretty sure people have done it before.

Regarding the /, it should definitely work for how I understood your issue. You simply want the following, right? if / is typed: 1 the current word should end 2 a new word should begin that will NOT be learned.

CardioDoc commented 6 years ago

He Maniac. Regarding the / I would like to use a prefix ("/") to signal that typingaid does not need to provide suggestions. This way, I can use "/text" in a different meaning than "text". This is not related to learning of words.

ManiacDC commented 6 years ago

@CardioDoc so are you asking that when you type "/", TypingAid will eat the "/" and you'll end up with "text", but no suggestions will pop up?

You type:

hello this is /text

what appears:

hello this is text

If that's what you're asking for, there's currently no way to do that without modifying the code.

hi5 commented 6 years ago

Perhaps: run a second script with a hotkey / (obviously) that toggles TypingAid, you can find the postmessage here https://autohotkey.com/docs/misc/SendMessage.htm and also at the end of https://autohotkey.com/docs/commands/Pause.htm

So now if you type / it will pause TA and therefore not suggest anything, pressing / again will unpause it etc.