Feedback
- press ENTER to search or ESC to cancel
Table of content
Globals namespaces
Constants
- Align
- AniDir
- BlendMode
- BrushPattern
- BrushType
- ColorMode
- FilterChannels
- Ink
- MouseButton
- MouseCursor
- RangeType
- SelectionMode
- SpriteSheetDataFormat
- SpriteSheetType
- WebSocketMessageType
Classes/objects
- Brush
- Cel
- Color
- ColorSpace
- Dialog
- Editor
- Events
- Frame
- GraphicsContext
- Grid
- Image
- ImageSpec
- KeyEvent
- Layer
- MouseEvent
- Palette
- Plugin
- Point
- Properties
- Range
- Rectangle
- Selection
- Site
- Size
- Slice
- Sprite
- Tag
- Tile
- Tileset
- Timer
- Tool
- TouchEvent
- Version
- Uuid
- WebSocket
- Window
app.clipboard
A set of functions to handle the clipboard.
When calling a function with clipboard write access in a script, Aseprite will ask the user if they want to allow the function to run or stop the script.
app.clipboard.text
local text = app.clipboard.text
Gets or sets the clipboard text. Returns nil
if there is no text.
app.clipboard.image
local image = app.clipboard.image
Gets or sets the clipboard image. Returns nil
if there is no image.
app.clipboard.content
local content = app.clipboard.content
Gets the content of the clipboard, as a table. Values:
image
: An image object ornil
selection
: A selection object ornil
palette
: A palette object ornil
tileset
: A tileset object ornil
text
nil
nil
\n
Depending on what is copied, each value will be set differently. Case table:
An image is copied in Aseprite | An image is copied externally | Text is copied | A portion of the Palette is copied | |
---|---|---|---|---|
image |
Image | Image | nil |
nil |
selection |
Selection | nil |
nil |
nil |
palette |
Sprite palette | nil |
nil |
nil |
tileset |
nil |
nil |
nil |
nil |
text |
nil |
nil |
String | String of selected colors in hex codes, seperated by \n |
app.clipboard.hasText
local hasText = app.clipboard.hasText
Returns true if the last item copied to the clipboard was text.
app.clipboard.hasImage
local hasImage = app.clipboard.hasImage
Returns true if the last item copied to the clipboard was an image.
app.clipboard.clear()
app.clipboard.clear()
Clears the clipboard.