aboutsummaryrefslogtreecommitdiffstats
path: root/select-comments.lua
blob: c0c281db7e0adbc4639b08c7c7d02a710f866862 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
script_name = "Select Comments"
script_description = "Selects all commented lines"
script_author = "garret"
script_version = "1.0.1"

function main(sub, sel)
    sel = {}
    for i=1,#sub do
        line=sub[i]
        if line.comment == true then
            table.insert(sel, i)
        end
    end
    aegisub.set_undo_point(script_name)
    return sel
end

aegisub.register_macro(script_name, script_description, main)