Removing AT statuses as you work

This one has always been a hot topic and I've been fairly opinionated on this in the past, but today there are so many published ways to do this I thought I'd share a simple way of automating the removal of the AT status as you work:

;------------------------------------------------------------------------------
; Clear AT statuses in SDL Trados Studio.
;------------------------------------------------------------------------------
^+f::
Send ^a^c!{Ins}^a^v
Return

The script is simple enough, you just press Ctrl+Shift+f and the AT status from a machine translation magically disappears so the active segment appears to be a new translation for you to post-edit.  The script just automates the selection of the target, copy the target to the clipboard, overwrite the target with the source which clears the AT status, select the target again and paste back the original machine translation.

Paul Filkin | RWS

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

  • Lianne van de Ven said:

    Quoting:

    ~^1:: ;Inserts translation result and removes AT status
    Send ^a
    Send ^c
    Send !{Delete}
    Send ^v
    Return

     

    Hm, this changes the status from unedited to edited AT for me but does not remove AT. This is how I normally manually remove AT scores (delete = empty target segment). Does your 1 assume the top row numbers or number pad? I already have customized ctrl + number pad (x) as a shortcut for entering translation results. As for moving out and back into the target: Studio sometimes has an issue with keeping focus in the cleared target segment, in which case you have to manually do that. Maybe that's why you added it?

     

     

    Hi Lianne, 

    It's the 1 in the top row numbers. If you already have Ctrl+1 to insert the 1st translation result, which is what I have as well, what this does is simply add the additional actions to the Ctrl+1 functionality, which is what the tilde before the shortcut does. What happens if you follow each of the steps in the script manually? That can give you a hint of which step isn't working for you. When trying out the steps, remember that ^ is Ctrl and ! is Alt.

  • Hi Nora,

    Thank you for your reply and explaining some script. My problem is caused by custom kb shortcuts in Studio. I have (alt+del) replaced with ctrl+alt+; (semicolon/colon, which is Oem1) and my (alt+ins) is replaced with ctrl+alt+Oem7 (single/double quote).
    I want to keep these, so I need to figure out the correct script. Maybe: Send ^!Oem1 instead of Send !{Delete}.

    In the meantime, I am also looking for some instructions on how to use these "Discourse" forums, because I don't even know how to quote a post.

    Thanks!
  • Hi Lianne,

    To quote a post, look for the Advanced Editing Options link below the Reply box, when you click that, there will be a Quote link just above the reply box.

    For the shortcut replacement, did you try ^!;?

    Best,

  • Lianne van de Ven said:
    In the meantime, I am also looking for some instructions on how to use these "Discourse" forums, because I don't even know how to quote a post.

    So this is how you do it!

    Paul Filkin | RWS

    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

  • And if you want to quote something else write an AHK script to give you the code you need (which you can see when you use the feature as I showed it here) and then just copy paste the quote from wherever you need it.

    Paul Filkin | RWS

    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

  • Paul Filkin said:

    So this is how you do it!

    (Please visit the site to view this video)

    Well thank you, Paul!! 

  • This worked indeed. I also changed the shortcut to ^e. What a breeze!
  • Note that if you use the setting to automatically insert the MT result into the target segment
    (Options --> Editor --> Automation, "Apply automated translation when no TM match is found"),
    after running this macro the "previous source" is still recorded as MT in the sdlxliff file.

    One option might be to use "Undo" before saving.
    Here is the macro I tried, which seems to work.
    I found that a pause was necessary after undo, otherwise Trados crashes, and you have to end the process via Task Manager.
    (because the error message keeps coming back when you click on OK).
    You can replace "F2" with the hotkey you would like to use to run the macro:

    ;------------------------------------------------------------------------------
    ; Remove AT sign, with Undo
    ;------------------------------------------------------------------------------
    F2::
    Send ^a^c^z
    Sleep 500
    Send ^v
    Return

    Another method is to simply move the mouse up, copy the text, and insert it.
    For this method, you turn off the setting to automatically insert the MT result into the target segment.
    First you have to find out the coordinates of the place you want to click in the results window.
    To find the position of the cursor, x and y coordinates, you can run Autohotkey's own utility "AU3_Spy.exe",
    which is in the installation folder.
    This macro uses "Relative" coordinates so they still work when the Trados panel is moved slightly.
    Place the cursor somewhere in the centre of the line in the results panel at the top,
    then read off the coordinates in their utility. In my case the coordinates were "871, 273".

    ;------------------------------------------------------------------------------
    ; Copy MT text down, with automatic insertion turned off
    ;------------------------------------------------------------------------------
    F2::
    CoordMode,Mouse,Relative
    SetDefaultMouseSpeed, 0 ; set to fastest mouse movement
    MouseMove, A_CaretX, A_CaretY ; move cursor to text insertion point, caret
    MouseGetPos, xpos, ypos ; record coordinates of where cursor is, at xpos, ypos
    Click 871, 273 ; clicks at these x, y coordinates, set to relative by coordmode
    Send ^a^c ; select all, copy
    MouseMove, xpos, ypos ; move the cursor back to original position
    Click ; and click in the target segment again
    Send ^v ; paste
    Return

    These macros are not fully tested so first test them on a copy,
    and use at your own risk, every configuration is different.