Page 1 of 1

Extendscript: Is there a way to work out arguments for [native code] functions?

Posted: August 1st, 2018, 5:29 am
by amichaels
I am trying to figure out arguments for native functions / methods that don't appear in any documentation (that I can find) - in my current project I am using extendscript within Premiere Pro but the issue would be the same if I was working with extendscript in After Effects.

Trying to probe a native function / method code via .toSource() or .toString() just comes back with variations on:

Code: Select all

function Function() {

    [native code]

}
Is there any way to figure out the number of arguments expected and their type? Extendscript's reflection object unfortunately only reveals the existence of these functions / methods but not the input arguments they require in order to execute.

Re: Extendscript: Is there a way to work out arguments for [native code] functions?

Posted: August 1st, 2018, 2:55 pm
by zlovatt
What function(s) are you looking for specifically? In the sidebar here there are links to the overall Adobe Extendscript reference guide, as well as the AE Scripting Guide specifically. You'll find lots of documentation info there!

Re: Extendscript: Is there a way to work out arguments for [native code] functions?

Posted: August 2nd, 2018, 1:13 am
by amichaels
In my current project, working in PPro, I'm looking for args for importMGTFromLibrary() within a sequence object and args for addTransition() and moveToTrack() within the QE DOM's equivalent of a TrackItem object. QE DOM method documentation in particular is difficult to come by as its actual use is for internal engineering tests at Adobe but for some things (working with transitions and effects in particular) its the only route to take as the main DOM doesn't yet support them.

Will keep searching for documentation and forums as you suggest but no luck so far..