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

Calling Apply Master Pages from a script

Advocate ,
Dec 17, 2018 Dec 17, 2018

Hello scripting friends,

There is no method to apply master pages for the Doc object, but I know it can be done, as I have done this before. But I cannot find the script anymore to figure out how that worked. Does anyone have the FCode or CallClient info to do this ?

Thanks in advance

4everjang

TOPICS
Scripting
2.0K
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 , Dec 17, 2018 Dec 17, 2018

Hi Jang,

CallClient ("masterpages, book.id);

where "book" is your Book object.

or

var cmd = app.GetNamedCommand ("ApplyMasterPages");

Fcodes ([cmd.Fcode]);

The Fcode version will only work on the active document.

-Rick

Translate
Community Expert ,
Dec 17, 2018 Dec 17, 2018

Hi Jang,

CallClient ("masterpages, book.id);

where "book" is your Book object.

or

var cmd = app.GetNamedCommand ("ApplyMasterPages");

Fcodes ([cmd.Fcode]);

The Fcode version will only work on the active document.

-Rick

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
Advocate ,
Dec 17, 2018 Dec 17, 2018

Thanks. The Fcode is what I needed. I checked the long FCode constants defs in the Scripting Guide but apparently the name for the code is not really create to be intelligible - or the list is incomplete.

Ciao

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
Adobe Employee ,
Dec 17, 2018 Dec 17, 2018

Does the doc need an update here?

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
Advocate ,
Dec 17, 2018 Dec 17, 2018

There have been a bunch of mistakes and omissions in the Scripting Guide that never got noticed - except by geeks like me. I still have an unfinished project to create a really useful ExtendScript reference website. I got halfway there but then business took over and like anybody else I need to make a living. It would be cool to have a web-based developer-friendly resource like that. Who knows what the upcoming year will bring...

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
Adobe Employee ,
Dec 17, 2018 Dec 17, 2018

For the FDK I'm already working on that with the Doc team … For ExtendScript doc I have that on my schedule for 2019 🙂

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 ,
Dec 17, 2018 Dec 17, 2018

I rarely use the Scripting Guide. I use the FDK docs and "translate" into ExtendScript. I also use the header files from the FDK to figure out constant values, notifications, etc.

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
Advocate ,
Dec 17, 2018 Dec 17, 2018

My resources in order of usage:

1. Scripitng Guide

2. Javascript Guide (CC - for XML object, File system access and UI objects)

3. FDK Reference

4. FDK include files

5. ESTK Javascript console

6. Creating small test scripts to figure out which properties work

7. Direct mail to the Adobe dev team

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 ,
Dec 17, 2018 Dec 17, 2018
LATEST

I also use the handy chm file at the bottom of this page:

Indesign JavaScript Help

I may be able to get him to create one for FrameMaker 2019.

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