RAFASU

aegisub.dialog.display

button, result_table = aegisub.dialog.display(dialog, buttons, button_ids)

@dialog (table)
@buttons (table)
@button_ids (table)
button (boolean or string)
result_table (table)
config = {
    {class="label", text="Times to frobulate", x=0, y=0},
    {class="intedit", name="times", value=20, x=0, y=1}
}
btn, result = aegisub.dialog.display(config,
        {"Frobulate", "Nevermind"},
        {"ok"="Frobulate", "cancel"="Nevermind"})
if btn then
    frobulate(result.times)
end 

aegisub.dialog.open

file_name = aegisub.dialog.open(title, default_file, default_dir, wildcards, allow_multiple=false, must_exist=true)

@title (string)
@default_file (string)
@default_dir (string)
@wildcards (string)
.)|.|XYZ files (.xyz)|.xyz”
@allow_multiple (boolean)
@must_exist (boolean)
file_name (nil, string, or table)
filename = aegisub.dialog.open('Select file to read', '', '',
                               'Text files (.txt)|*.txt', false, true)
if not filename then aegisub.cancel() end

file = io.open(filename, 'rb')
....

aegisub.dialog.save

file_name = aegisub.dialog.save(title, default_file, default_dir, wildcards, dont_prompt_for_overwrite=false)

@title (string)
@default_file (string)
@default_dir (string)
@wildcards (string)
.)|.|XYZ files (.xyz)|.xyz”
@dont_prompt_for_overwrite (boolean)
file_name (nilor string)
nilstring

aegisub.dialog.display.

class (string)
  • “label”,
  • “edit”, “intedit”, “floatedit”, “textbox”,
  • “dropdown”,
  • “checkbox”,
  • “color”, “coloralpha”, “alpha”
x (number)
y (number)
width (number)
height (number)
x,y

hint (string)
name (string)

label (string)

text (string)

value (number)
min (number or nil)
max (number or nil)
minmax.

step (number or nil)

items (table)
value (string)

value (boolean)

value (string)

name

label: nil
edit, textbox: string
textbox
intedit, floatedit: number
dropdown: string
checkbox: boolean
color, coloralpha, alpha: string
value

cancelclose

cancelclose

ok, yessave

help