
TLTR: I'm looking for a way to "click Duik buttons" with a jsx script.
At the moment I work on creating a custom macro keyboard for use with AfterEffects and of course Duik.
My knowlegde of extendscript is limited, though I figured out that I can use DuAEF to include/reproduce Duik functionality in my script.
For example I have a key to create a spine structure. I want to mimic Duik's behaviour as close as possible, so I dug a bit into the code and basically tried to copy the code for what Duik does when creating a spine.
Here's my solution so far:
Code: Select all
#include DuAEF_no_bin.jsxinc
function spine()
{
var comp = DuAEF.DuAE.Project.getActiveComp();
if (!comp) return;
app.beginUndoGroup('Duik | ' + "Create spine structure");
DuAEF.DuAE.Project.setProgressMode(true);
DuAEF.Duik.Structure.createSpine(1,2,1,true);
DuAEF.DuAE.Project.setProgressMode(false);
app.endUndoGroup();
}
So what (I think) I'm looking for is a way to call for example
Code: Select all
ui_spineValidButton_clicked(true);
Any insight on how this could be achieved is highly appreciated.
PS: I have another plugin (SortIt by EyeDesyn) that allows to execute functionality via a keyboard shortcut. There is one .jsx file per shortcut (and the shortcut gets added in AE to execute the corresponding script). Each .jsx contains only a few lines of code like this:
Code: Select all
#targetengine "sort-it";
try{
groupLayersShortcut.pressed = true;
}catch(err){
}
Maybe if I figured out how it works for this plugin it might bring me closer to do it for Duik.
