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
I have done with my works.
Thanks,
-Jothi
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
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
Copy link to clipboard
Copied
I have done with my works.
Thanks,
-Jothi