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

Scripts break in InDesign 2018 CC.

New Here ,
Jun 04, 2018 Jun 04, 2018

Copy link to clipboard

Copied

I have a small automation project I want to do—note that I haven't done any scripting in InDesign since CS6—and opened up Script Editor.

First problem: File ► Open Dictionary... and using that to open InDesign spit back a blank window with the message "Nothing to see here, move along."

Oooookay. So I posted the following script:

tell application "Adobe InDesign CC 2018"

    tell document 1

        set aNewPage to make page at end

    end tell

end tell

and I got the following error:

error "The variable page is not defined." number -2753 from "page"

More concerning was that in opening up the Scripts window in InDesign, I discovered that the AddGuides script doesn't work, either; the JavaScript version does, but the AppleScript one throws an error.

So, how do I get the current scripting dictionary for InDesign CC 2018? Did something change with the scripting lately?

TOPICS
Scripting

Views

980

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
Engaged ,
Jun 04, 2018 Jun 04, 2018

Copy link to clipboard

Copied

HI

yeah, things have changed a ee nit since CS6

try this

tell application "Adobe InDesign CC 2018"

    set myDoc to make new document with properties {document preferences:{page width:100, page height:100, facing pages:false}}

    tell myDoc

        set aNewPage to make page at after page 1

    end tell

end tell

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
New Here ,
Jun 04, 2018 Jun 04, 2018

Copy link to clipboard

Copied

As far as the script goes, it doesn't matter if I make a new document or use document 1; the problem is that when I type "make page", it assumes "page" is a variable rather than an object. "at end" or "at after page 1" or whatnot doesn't really matter, either.

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
Engaged ,
Jun 05, 2018 Jun 05, 2018

Copy link to clipboard

Copied

LATEST

just in case, is your document active?, as it will not work unless it is so

your code works fine if I have an active document

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
Engaged ,
Jun 04, 2018 Jun 04, 2018

Copy link to clipboard

Copied

forgot to mention, to get the dictionary from Script Editor, open it, in the file menu select open dictionary, then scroll to your desired app

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
New Here ,
Jun 04, 2018 Jun 04, 2018

Copy link to clipboard

Copied

Er, yes, that's exactly what I did. And that's the result I got.

("First problem: File ► Open Dictionary... and using that to open InDesign spit back a blank window with the message 'Nothing to see here, move along.'")

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