app object provides access to the application state, active documents, and UI elements.
Properties
Active sprite. Same as
activeSprite.The currently active sprite document.
Active layer. Same as
activeLayer.The currently selected layer.
Active frame. Same as
activeFrame.The currently selected frame.
Active cel at the current layer and frame.
The image from the active cel.
Active tag at the current frame.
Currently selected tool.
Currently selected brush.
Array of all open sprites.
Foreground color.
Background color.
Foreground tile index (for tilemap mode).
Background tile index (for tilemap mode).
Aseprite version.
API version number.
Active site (sprite, layer, frame location).
Current selection range in timeline.
True if running with UI, false if running from CLI.
Default palette for new sprites.
Main application window.
Application-level events.
Current UI theme.
UI scale factor.
Active sprite editor.
System clipboard access.
Methods
app.open(filename)
Path to the sprite file to open.
app.exit()
Closes Aseprite.app.transaction(function)
Function to execute within the transaction.
app.transaction(label, function)
Label for the undo/redo entry.
Function to execute within the transaction.
app.undo()
Undoes the last operation.app.redo()
Redoes the previously undone operation.app.alert(text)
Message to display.
app.alert(options)
Alert configuration table.
app.refresh()
Refreshes the screen.app.useTool(options)
Tool usage configuration.
app.tip(text, duration)
Tooltip text.
Duration in seconds (default: 2).

