Paste text from another program into Studio, one sentence per segment

For this script to work, the block of text needs to be pasted into the first segment before activating the script. Furthermore, the "Use Regular Expressions" checkbox in the Find dialog in Studio must be unchecked before running the script, as the script checks and then unchecks the box each time the sequence is run. The script assumes that there's a hard return between each new sentence/segment. See a short demo video of the script in action here: 

 

 

#IfWinActive ahk_exe SDLTradosStudio.exe
;––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––-
; Cuts text AFTER the Regex pattern, then pastes it into the next segment. The regex pattern is new line \n.
; After pasting the text into the first segment, press Windows+V to activate
;––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––-

#v::
InputBox,Var,Paste one sentence per segment (by Nora Díaz), How many times do you want to run the sequence?
loop, % Var
{
Send ^{PgUp}
Sleep 100
Send, ^f
Sleep 200
Send, \n
Sleep 200
Send !t
Sleep 200
Send !u
Sleep 200
Send !n
Sleep 200
Send !u
Sleep 200
Send {Esc}{Right}
Sleep 100
Send ^+{PgDn}
Sleep 100
Send ^x{Delete}{Backspace}
Sleep 100
Send {Down}^v
Sleep 200
}
Return