I need a AHK script to implement copying multiple lines of text to the corresponding multiple lines in the translation box

I need a AHK script to implement copying multiple lines of text to the corresponding multiple lines in the translation box

Hi Jack,
I have one that does what I think you are requesting. Once you've copied your multiple lines, go to the first segment in Trados editor and click the triggering keys (ctrl+alt+shift+F4). If nothing happens, you may have to change (or remove) the #IfWinActive values depending on you Studio version.
Oh, and I'd recommend disabling all TMs and termbases from your project before running it, that way it will run smoother.
Hope it helps.
Víctor
First of all, thank you for your reply and sharing. I have solved this problem perfectly by myself. If you need, I can email you.
#Requires AutoHotkey v2.0
#SingleInstance Force
SendMode("Input")
SetWorkingDir(A_ScriptDir)
^+v:: ; Ctrl+Shift+V
{
; 等待剪贴板准备好(最多2秒)
if !ClipWait(2)
{
MsgBox("剪贴板为空或无法读取,请先复制文本。")
return
}
; 备份原始剪贴板(包含格式)
ClipSaved := ""
try ClipSaved := ClipboardAll()
; 安全读取文本
ClipText := A_Clipboard
ClipText := StrReplace(ClipText, "`r`n", "`n")
ClipText := StrReplace(ClipText, "`r", "")
ClipText := StrReplace(ClipText, Chr(0xFEFF), "") ; 去 BOM
if (Trim(ClipText) = "")
{
MsgBox("剪贴板中没有文本可用。")
if (ClipSaved != "")
A_Clipboard := ClipSaved
return
}
; 分行
Lines := StrSplit(ClipText, "`n")
; 激活 Trados 窗口一次
WinActivate("A")
Sleep 150
for Line in Lines
{
Line := Trim(Line)
if (Line = "")
continue
; 把这一行放到系统剪贴板
A_Clipboard := Line
ClipWait(0.5)
; 进入单元格编辑模式
Send("{Enter}")
Sleep 50
; 粘贴文本
Send("^v")
Sleep 100 ; 等待 Trados 完成粘贴
; 确认输入
Send("{Enter}")
Sleep 50
; 下移到下一行
Send("{Down}")
Sleep 100
}
; 恢复原始剪贴板
if (ClipSaved != "")
A_Clipboard := ClipSaved
MsgBox("所有译文已逐行粘贴完成!")
}