2006-12-28 22:19:59 +01:00
|
|
|
-- Automation 4 demo script
|
|
|
|
-- Macro that adds \be1 tags in front of every selected line
|
|
|
|
|
|
|
|
script_name = "Add edgeblur macro"
|
2007-01-03 05:31:17 +01:00
|
|
|
script_description = "A demo macro showing how to do simple line modification in Automation 4"
|
2006-12-28 22:19:59 +01:00
|
|
|
script_author = "Niels Martin Hansen"
|
|
|
|
script_version = "1"
|
|
|
|
|
|
|
|
|
|
|
|
function add_edgeblur(subtitles, selected_lines, active_line)
|
|
|
|
for z, i in ipairs(selected_lines) do
|
|
|
|
local l = subtitles[i]
|
|
|
|
l.text = "{\\be1}" .. l.text
|
|
|
|
subtitles[i] = l
|
|
|
|
end
|
|
|
|
aegisub.set_undo_point("Add edgeblur")
|
|
|
|
end
|
|
|
|
|
2007-01-03 05:31:17 +01:00
|
|
|
aegisub.register_macro("Add edgeblur", "Adds \be1 tags to all selected lines", add_edgeblur)
|