aboutsummaryrefslogtreecommitdiffstats
path: root/a-b.lua
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2021-04-05 16:03:24 +0100
committergarret <garret@airmail.cc>2021-04-05 16:03:24 +0100
commit9c2c5b5424abd2c61a3d293c2c578134fe1de9ba (patch)
treee91c8ac1dd622c6096bb945a337bf9bad77516f7 /a-b.lua
downloadaegisub-scripts-9c2c5b5424abd2c61a3d293c2c578134fe1de9ba.tar.gz
aegisub-scripts-9c2c5b5424abd2c61a3d293c2c578134fe1de9ba.tar.bz2
aegisub-scripts-9c2c5b5424abd2c61a3d293c2c578134fe1de9ba.zip
initial commit
Diffstat (limited to 'a-b.lua')
-rw-r--r--a-b.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/a-b.lua b/a-b.lua
new file mode 100644
index 0000000..e05bd47
--- /dev/null
+++ b/a-b.lua
@@ -0,0 +1,21 @@
+script_name = "A-B"
+script_description = "makes checking pre-timing possible.\nCAUTION: Overwrites every selected line!"
+script_author = "garret"
+script_version = "2021-04-03"
+function main(sub, sel)
+ local i = 0
+ for si,li in ipairs(sel) do
+ line = sub[li]
+ if i == 0 then
+ line.text = line.actor.." a"
+ i = 1
+ elseif i == 1 then
+ line.text = line.actor.." b"
+ i = 0
+ end
+ sub[li] = line
+ end
+ aegisub.set_undo_point(script_name)
+ return sel
+end
+aegisub.register_macro(script_name, script_description, main)