AutoHotKey script for choosing translaton suggestion from AI Assistant

Hei,

I have tried to write an AutoHotKey script for automatically replacing suggestions from OpenAi provider with suggestion from AI Assistant (keyboard shortcut Alt+W), confirm and go to the next segment. I wanted to automatize this process by pressing F9 key. It seems though that my script has some error, because what happens after applying F9 is that the translation from Open Ai is chosen anyway, not the suggestion from AI Assistant.

Do you have any suggestions what should be replaced in my script?

Thank you so much for your help in advance.

Screenshot of a translation software interface with two segments of text. The left side shows text in Norwegian, and the right side shows the Polish translation. A red arrow points to the Polish translation.

; AutoHotkey script to apply translation suggestion from AI Assistant,
; confirm the current segment, and move to the next segment in SDL Trados Studio

; Set a hotkey (e.g., F9) to trigger the commands
F9::
; Activate SDL Trados Studio window
WinActivate, ahk_exe TradosStudio2024_18.0.0.1013.exe ; Adjust the executable name if necessary

; Send the command to apply translation suggestion
; Replace with the actual shortcut you use to apply AI suggestion if needed
Send, ^a ; Assuming Alt+W applies the suggestion

; Confirm the current segment
Send, ^{Enter} ; Assuming Ctrl+Enter confirms the segment


return

   



Generated Image Alt-Text
[edited by: RWS Community AI at 4:42 PM (GMT 1) on 5 Oct 2024]
emoji