Highlighted

Calling script inside sdk

Explorer ,
Apr 22, 2020

Copy link to clipboard

Copied

Hi Everyone,

I have called script inside the sdk it build successfully. By using script i fetched the undo history list now, my doubt is how to display the history list in to dropdown which was designed in .fr file. Please do guide me on this......

-Jothi

TOPICS
SDK

Views

283

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Calling script inside sdk

Explorer ,
Apr 22, 2020

Copy link to clipboard

Copied

Hi Everyone,

I have called script inside the sdk it build successfully. By using script i fetched the undo history list now, my doubt is how to display the history list in to dropdown which was designed in .fr file. Please do guide me on this......

-Jothi

TOPICS
SDK

Views

284

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 22, 2020 0
Adobe Community Professional ,
Apr 23, 2020

Copy link to clipboard

Copied

Look at kDropDownListWidgetBoss, this is the boss class that represents the dropdown. For an example of how to add dropdown to the UI have a look at the WriteFishPrice sample plugin. The interfaces that you should look at is IStringListControlData. You can also look at Basicpersistence sample plugin also i see the code to add entries to dropdown in the BPIUIDlgController.cpp file, look at the method InitializeDialogFields

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 23, 2020 0
Explorer ,
Apr 27, 2020

Copy link to clipboard

Copied

Yeah! i have seen WriteFishPrice sample plugin. But, there is nothing like using script and then calling the values. I have used the below code in sample plugin to fetch and then display the undo history using script

void CustomHttpLinkUIObserver::loadFilesInDropdown()
{

// Find the dropdown widget ID = kFileListWidgetID
InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss));
InterfacePtr<IScriptRunner> scriptRunner(scriptManager, UseDefaultIID());
//Utils<IScriptArgs>()->Set("xmlTags", this->GetPluginPath() + "\\TBtags.xml");
PMString scriptCode;
scriptCode.Append("var UH = app.activeDocument.undoHistory;");
scriptCode.Append("alert(UH);");
PMString engineName("myengine");
int32 errorCode = Utils<IExtendScriptUtils>()->RunScriptInEngine(engineName, scriptCode);
//scriptRunner->RunScript(scriptCode);
Utils<IScriptArgs>()->Clear();
}

How i display the history list into dropdown list???

-Jothi

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 27, 2020 0