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

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.).

5 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