我使用 applescript 远程 Aegisub 以按时间移动视频字幕时间线。请看图片。 这是“移位”窗口。
这是我使用的代码:
tell application "Aegisub"
activate
delay 0.1
end tell
tell application "System Events"
tell process "Aegisub"
keystroke "i" using command down --cmd+i open "shift by" window
delay 0.3
click radio button "Time: " of window "Shift Times" --choose shift by time not frames
delay 0.3
set the value of text field 1 of window "Shift Times" to "0:00:00.20" --set up shift how long time
click radio button "Forward" of window "Shift Times" --forward or backward
click radio button "Selection onward" of group "Affect" of window "Shift Times"
delay 0.3
click button "OK" of window "Shift Times"
end tell
end tell
注意这一行:
set the value of text field 1 of window "Shift Times" to "0:00:00.20"
它确实将文本字段 1 的屏幕值更改为“0:00:00.20”。但实际上它会按您使用的最后一个值移动时间。
如果您用键盘手动输入“0:00:00.20”,它将按时间“0:00:00.20”移动。只有这条线在这里不起作用。看起来它与时间码的格式有关。请注意,应用程序使用的时间码是“0:00:00.20”,而不是“0:00:00:20”。希望可以有人帮帮我。