Hotkeys used within AHK scripts (such as ^a, ^c, etc.) don't seem to work any more after I installed Trados Studio 2021 SR2 - 16.2.8.9097 yesterday. Most of my AHK scripts no longer work.
Hotkeys used within AHK scripts (such as ^a, ^c, etc.) don't seem to work any more after I installed Trados Studio 2021 SR2 - 16.2.8.9097 yesterday. Most of my AHK scripts no longer work.
I also modified the Send ^a^c command to Send ^c and issued the Ctrl-a command manually before starting the script. Same result. I also used ^a only. Same result. I also tried Send {right}. The cursor did not move. So it seems that no AHK keyboard command works.
I've just tested the sample script and it works as expected, as do my other AHK scripts, so it must definitely be something specific to Friedrich's computer.
Hi Nora,
I attended your ATA AHK course recently and learned about AHK for the first time. Thanks a lot. It initially worked like a charm.
But suddenly this problem started. I know by now that it must be local to my computer. But what might it be? It still works perfectly in all other applications. It's only Trados Studio Pro that's affected, i.e., none of the keyboard commands works.
Have you tried a different hotkey? Are you 100% sure Trados is the active window when you press the hotkey? Have you tried a script that doesn't have a hotkey but instead runs its functions after e.g. 2 seconds (enough time to switch to Trados and ensure your cursor is in the right place after you double-clicked the script)? Are you sure you have exited the previous instances of the test scripts before starting the new instances?
I just tried Trados Studio 2019, which is still installed on the same computer. The script works there as expected. Also MultiTerm 2019 and 2021 are not affected. It's definitely only Studio 2021 SR2 that's giving me this problem - even after resetting all keyboard shortcuts to the defaults. Is there a way to undo the SR2?
Yes, I tried Ctrl-X, Ctrl-Y. The actual script using this piece of code uses Ctrl-Shift-C. I've also reset the shortcuts to defaults. And I always recompiled when making any changes to the script during the tests. I'm 100% sure that Trados is the active window. All this works perfectly when using Trados Studio 2019, as I just found out. It's highly probable that it has something to do with the SR2 of Studio 2021 that is in conflict with something on my computer. Is there a way to undo the SR2?
Slightly off-topic: with the most usual installation of AHK, you don't need to compile most scripts to run them. You can just double-click the AHK file.
Ignore my question about exiting the script -- I see now that AHK warns one if you try to run same script twice simultaneously. AU3 doesn't warn the user of this.
Actually, when I said "compiled", I meant "double-clicking the AHK file".
The fault may also be mine: I use the term "compile" for turning the AHK file into an EXE file that can be run on a computer that doesn't have AHK installed. But I can't remember all the installation options of AHK -- perhaps one can install it in such a way that double-clicking it does, in fact, create an EXE file from it.
Actually, my understanding of "compile" is the same as yours. I was just imprecise in my wording. Double-clicking the AHK script file probably just activates the latest version of the file for being interpreted by the AHK client. The AHK package does include a compiler named ahk2exe.exe that seems to generate exe files, but I haven't tried that yet.