TypingAid icon indicating copy to clipboard operation
TypingAid copied to clipboard

Interactions between hotstring and TypingAid

Open CardioDoc opened this issue 7 years ago • 8 comments

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

CardioDoc avatar Mar 28 '18 14:03 CardioDoc

  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.

ManiacDC avatar Mar 28 '18 14:03 ManiacDC

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.

CardioDoc avatar Mar 31 '18 09:03 CardioDoc

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

AlexFainshtein avatar Mar 31 '18 22:03 AlexFainshtein

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

CardioDoc avatar Apr 01 '18 18:04 CardioDoc

@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.

ManiacDC avatar Apr 02 '18 15:04 ManiacDC

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.

CardioDoc avatar Apr 03 '18 19:04 CardioDoc

@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.

ManiacDC avatar Apr 04 '18 15:04 ManiacDC

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.

hi5 avatar Apr 04 '18 16:04 hi5