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

AppleScript not adding new pages in InDesign CC 2018

New Here ,
Mar 29, 2018 Mar 29, 2018

I have an AppleScript I use to add pages and series of linked text boxes on each page. I usually update it for different measurements with different projects. The scripts I wrote last year when i was using CC 2017 still work, but if I edit the script, it will not execute the new pages command. Instead I get the error message:

Error Number: -2710

Error String: Adobe InDesign CC 2018 got an error: Can't make class new page.

To test this, I made a sample script, which gets  the same error, even though all this code worked fine last year:

tell application "Adobe InDesign CC 2018"

  tell document 1

  set myNewPage to make new page

  end tell

end tell

TOPICS
Scripting
1.6K
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

Participant , Mar 30, 2018 Mar 30, 2018

--Oddly, the problem is the word "new". Try:

tell application "Adobe InDesign CC 2018"

  tell document 1

  set myNewPage to make page at end

  -- these work too:

  --set myNewPage to make page at beginning

  --set myNewPage to make page at before page 2

  end tell

end tell

Translate
Participant ,
Mar 30, 2018 Mar 30, 2018

--Oddly, the problem is the word "new". Try:

tell application "Adobe InDesign CC 2018"

  tell document 1

  set myNewPage to make page at end

  -- these work too:

  --set myNewPage to make page at beginning

  --set myNewPage to make page at before page 2

  end tell

end tell

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
New Here ,
Apr 01, 2018 Apr 01, 2018
LATEST

Thank you very much; this worked. I don't understand why it didn't cause problems before, but at least it is all working now.

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