Select all segments and change their status in Editor

Howdy,

I wish to share this script to Select all segments in Editor and then change their status to whatever you wish.

Here is the script and the important notes that you need to read before running the script:

#IfWinActive ahk_exe SDLTradosStudio.exe
; ---------------------------------------------
; Select all segments and change their status in Editor
; www.youtube.com/watch
; ---------------------------------------------
F12 UP::
    SendInput ^{Home} ; Go to 1st segment
    SendInput {Down}
    SendInput {Alt Down}{Space} ; Select 1st segment
    SendInput {Shift Down} ; Press CTRL and SHIFT keys
    SendInput {Control Down}
    SendInput {End} ; Go to last segment
    
    ;~ Sleep 100
    SendInput {Control up} ; releasing all keys
    SendInput {Shift up}
    SendInput {Alt up}   
 
    SendInput !hu ; ALT+H+U shortcut opens clicks on the Change Segment Status button of the Home ribbon (Enlish UI)
    ; SendInput t ; Change Segment Status to TRANSLATED (Enlish UI)
    ; SendInput a ; Change Segment Status to TRANSLATION APPROVED (Enlish UI)
    ; SendInput i ; Change Segment Status to SIGNED OFF (Enlish UI)
return
#IfWinActive

IMPORTANT:

  • I’ve used the F12 key to trigger the script, but you'd better use another shortcut.
  • I haven’t used any Sleep commands, but if the script doesn’t work on your PC, try un-commenting the ones you see in the script.
  • I’ve tested it in Trados Studio 2019, with English user interface. If your version or UI language are different, you’d need to modify the last part of the script accordingly.
  • Optional & Dangerous: In order to select the status you want to apply to all segments, you’ll need to un-comment 1 and only 1 of the 3 SendInput commands. Be very careful with the one you un-comment as any mistake can completely ruin your translation. For example, if you selected “n”, that would remove all the translations; sure you’ll freak out and blame me (although you can easily undo with CONTROL+Z). I recommend you checking and testing your script in a dummy file! If you’re unsure of what you’re doing, don't un-comment any SendInput line!
  • If you’re curious, watch the YouTube video (link inluded in the header) that explains how to select segments with the keyboard. That will give you insights about the first SendInput commands.
  • This script goes specially to Jerzy Czopik: I read he needed this functionality and I wanted to help, because he has already helped many Studio users, me included. I hope this script balances my karma and helps many people.
Parents Reply Children
No Data