Skip to content

Instantly share code, notes, and snippets.

@justintaylor-dev
Created January 6, 2022 17:51
Show Gist options
  • Save justintaylor-dev/31cedfda52221057608d8dd6bc1e863e to your computer and use it in GitHub Desktop.
Save justintaylor-dev/31cedfda52221057608d8dd6bc1e863e to your computer and use it in GitHub Desktop.
AEGP_ExecuteScript Example
// Example on how to execute an ExtendScript script inside of an After Effects C++ Plugin
AEGP_SuiteHandler suites(in_data->pica_basicP);
A_Boolean outAvailablePB;
AEGP_MemHandle outResultPH;
AEGP_MemHandle outErrorStringPH;
ERR(suites.UtilitySuite4()->AEGP_IsScriptingAvailable(&outAvailablePB));
ERR(suites.UtilitySuite4()->AEGP_ExecuteScript(NULL, "alert(123);", true, &outResultPH, &outErrorStringPH));
ERR(suites.MemorySuite1()->AEGP_FreeMemHandle(outResultPH));
ERR(suites.MemorySuite1()->AEGP_FreeMemHandle(outErrorStringPH));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment