Continuous scripts?

Are scripts able to run continuously? As in, can they monitor app variables and tweak them on the fly, or do they run through once when selected by the user?

[EDIT] I’ve figured out my answer. It’s yes, they can be continuously running. Thank you

1 Like

did you find an example script or some reference to figure that out? if so it’d be great if you can share it since i am looking into this topic too. (i want my scripts to react to certain events, like when a certain cell is selected).

thanks :slight_smile:

At the moment Dialog:show{ wait=false } is the only thing to run a script “in background” (keep a window opened while Aseprite widgets are still clickeable).

There are plans to publish general events in a future through the new init(plugin) interface to create scripts that react to events from Aseprite widgets (sprite editor, timeline, color bar, etc.).

7 Likes

thanks for the reply. having general events available will be awesome! it seems there isn’t any documentation on the plugin interface but from what i’ve seen from the source code it looks like i can put my script as a context menu into the cel popup which is a good interim solution until the new api is done.

thanks again, scripting aseprite is so much fun i almost have no time to draw with it anymore :smiley:

3 Likes

I figured it out because of the the same tag that dacap mentioned. This is perfect as I needed to keep the dialog open so the user had constant easy access to the functions as it will actively aid in palette creation.

Thank you, @dacap for your timely response.

3 Likes

Hello!

I was wondering if there is some progress with event handling system in LUA? :slight_smile:
Because it looks like the most important but missing feature is possibility to create a custom tool or custom listener for common events (like mouse click on image for example)…

I couldn’t find anything about this in API, but maybe I’m missing something and maybe there is plan to add it in the near future?

1 Like