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.
Sounds very odd. Can you share one small example that doesn't work, so we can at least see if there is anything in the script that might be affected by this?
Paul Filkin | RWS Group
________________________
Design your own training!
You've done the courses and still need to go a little further, or still not clear?
Tell us what you need in our Community Solutions Hub
Hi Paul:
See this test script as an example, which is an excerpt from a longer script:
;-----------------------------
;Ctrl+Shift X
;Testing Ctrl-a, Ctrl-C
;-----------------------------
^+x::
clipboard :=
Send ^a^c
ClipWait, 2
if (ErrorLevel > 0) {
Msgbox Error=%errorlevel%
Exit
}
Msgbox %clipboard%
Return
This works correctly in MS Word but not in Trados Studio 2021 SR2 - 16.2.8.9097. But it has worked correctly in Studio as well before.
I'm really at a loss what might be wrong here.
Kind regards,
-Friedrich
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.
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?
That's very interesting. While I don't have any advice on rolling back SR2, I'm thinking of one thing you may want to try: running the script as administrator. What happens if you do that?
How nice to hear this, Friedrich! I'm so glad you're now using AutoHotkey after attending the course, but I'm sorry you've run into this hiccup. Hopefully it will get sorted out.
What do you mean? I usually double-click the AHK file, and within the Studio editor I use the key combination to run the script. I don't see an option to run this as administrator.
To run an AHK script as administrator, right-click the AHK file, and select "Run as administrator".
YES! That did it! That solved the problem, and my scripts work again!
Thank you so much, Nora and Samuel!
I still wonder, though, why I seem to be the only one who has this problem, and why this is unique to Studio 2021 on my PC.
See also this thread about how to run scripts as administrator. I believe it's possible to specify it in the script itself, so you don't have to right-click the script manually.
Yay! I'm not entirely sure why this happened only to you, but it may just be that others (like myself) are already running AutoHotkey with administrator privileges. You can do that by locating Autohotkey.exe and running it as administrator by right-clicking on it and selecting Run as administrator.
Yay! I'm not entirely sure why this happened only to you, but it may just be that others (like myself) are already running AutoHotkey with administrator privileges. You can do that by locating Autohotkey.exe and running it as administrator by right-clicking on it and selecting Run as administrator.
I suspect I somehow set Trados Studio 2021 to run as administrator by default, which means it runs as an "elevated" program, which does not allow input by a "non-elevated" program. I just learned that from the link that Samuel sent.