Add tags with a single keystroke

Here's one  and I collaborated on. We've been meaning to write about it in our blogs, but here it is in the meantime. Further explanation to come in the blog article, but in a nutshell it allows you to insert tags sequentially by pressing a single key while ignoring placeables. As you can see, this script uses the Left Windows key.

The script assumes that the default Ctrl+Enter shortcut is used to confirm segments. If a different shortcut is used, it needs to be replaced accordingly on the last line of the script.

;Add tags with LWin key

n:=1
return

Lwin::
if (n = 1)
Send, ^!{Right}{Esc}{Right}
else
{
Send, {Ctrl Down}{Alt Down}{Right %n%}
Sleep 200
Send, {Ctrl Up}{Alt Up}{Esc}{Right}
}
n++ ; increment n
return

~^Enter::n := 1 ;script is reset with Confirm and Move to Next Segment shortcut, tilde is needed to pass through the original action for Ctrl+Enter

Parents
  • Hi Nora. This might seem a silly question, but where do I input this script to make it work? I have Trados 2021. I'm not so well-versed in this back-end technical stuff, but I really would like this feature you created because it's exactly what I need right now. Thanks.

  • Hi Michael, 

    This is an AutoHotkey script, so you would need to follow these steps:

    First, download AutoHotkey (www.autohotkey.com) and install it. Once installed, you won't see anything open, that's normal. AutoHotkey runs in the background and allows you to run your own scripts (macros), which are created in plain text editors, such as Notepad or Notepad++.

    To create a new script:

    1. Go to a folder in Windows Explorer where you would like to save your script (I have a folder called AutoHotkey Scripts just to keep them all in one place). Right-click on an empty space in the folder and select New-AutoHotkey Script. Give a name to your script and save it.

    So far, you have the empty "skeleton" of a script. Now you need to enter the actions you want it to execute.

    2. Right-click on the script and select Open, then open it with a text editor, such as Notepad (I prefer Notepad++, available for free).

    3. Once the file is open, you will see that there's already some text in it. Paste the script code in a new line.

    4. Save the file. Now double-click the file, and this will load the script. Look for a green square with a white H in it in your system tray, which indicates that the script is active.

    5. Now that the script is active, press your hotkey (the Windows key) to trigger the actions in the script.



  • Hi Nora,

    Thank you so much for these instructions. It works like a charm. A big chunk of my work has been made a great deal easier thanks to this script you've provided, so thank you!

Reply Children
No Data