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

Fetching page count values

Participant ,
May 28, 2020 May 28, 2020

Copy link to clipboard

Copied

Hi,

I need to fetch the values of page count so that I have called the JavaScript functionality. But I won't get the values inside the panel at the sametime it displaces the Javascript code into textbox. Please guide me on this
PMString scriptCode;
scriptCode.Append("var PageCount = app.activeDocument.pages.length;");
scriptCode.Append("alert(PageCount);");

K2Vector<WideString> values1;
InterfacePtr<IBPISuite> bpiSuite1(fCurrentSelection, UseDefaultIID());
if (bpiSuite1 && bpiSuite1->CanGetBPIData()) {
bpiSuite1->GetBPIData(values1);
}

// Update the data displayed in the panel's widgets.
InterfacePtr<IPanelControlData> panelControlData1(this, UseDefaultIID());
ASSERT(panelControlData1);
if (!panelControlData1) {
break;
}


// Display each string returned by the suite in a line in the multi line widget.
IControlView* textControlView1 = panelControlData1->FindWidget(kPageCountTextEditBoxWidgetID);
ASSERT(textControlView1);
if (!textControlView1) {
break;
}
InterfacePtr<ITextControlData> textControlData1(textControlView1, UseDefaultIID());
ASSERT(textControlData1);
if (!textControlData1) {
break;
}


textControlData1->SetString(scriptCode);

} while (false);

-Monisha
TOPICS
How to , Scripting , SDK

Views

343

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
community guidelines
Adobe Employee ,
Jun 11, 2020 Jun 11, 2020

Copy link to clipboard

Copied

LATEST

Votes

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
community guidelines