[Command] Paste string coming from outside in a script

Hello, this is my first question, and of course really love how cool is Aseprite supporting scripts.

What I want to do is to paste an hex string like #33ff44ff and set the foreground color with the chosen one.

I have tried to use app.command.Paste() and app.command.PasteText()

local colortext =app.command.Paste()


but in the alert appears command: and the number of the command, but I cannot paste the value.

Is this possible? I think it would be great for scripting.

Thank you!

Hello Juan! :smiley:

I think that what you want is not paste, but something like this:

local strColor = "#33ff44ff" --your string
local yourColor = Color{ 
app.fgColor = yourColor

I hope it helps! :slight_smile:

Also, I recommend you to use these links for future references:

1 Like