Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

AEGP_ExecuteScript Examples

Contributor ,
Jul 18, 2021 Jul 18, 2021

I would like to offer a simple dialog box and capture user input via AEGP_ExecuteScript()

 

Then I would display the user input in a ECW 

 

Are there such examples ?

TOPICS
SDK
362
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 20, 2021 Jul 20, 2021

Here's an example from a project a while back:

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));
Translate
Community Expert ,
Jul 18, 2021 Jul 18, 2021

i don't know of a sample that utilizes AEGP_ExecuteScript, but the ECW bit is demostrated in the "ColorGrid" sample project.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2021 Jul 18, 2021

perhpas a custom UI is not necessary... you could just rename a param to show the data...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 20, 2021 Jul 20, 2021
LATEST

Here's an example from a project a while back:

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));
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines