Skip to content

Instantly share code, notes, and snippets.

@cu39
Last active December 12, 2016 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cu39/9954526 to your computer and use it in GitHub Desktop.
Save cu39/9954526 to your computer and use it in GitHub Desktop.
【InDesign】DocumentからスタートしてDocumentまで戻る【DOM散歩】 ref: http://qiita.com/cu39/items/3f8b857f2d03c7e6163e
var doc = app.activeDocument;$.writeln( doc ===
app.activeDocument // Document
.stories // Stories
.item(0) // Story
.paragraphs // Paragraphs
.item(0) // Paragraph
.parentTextFrames[0] // TextFrame (item() does not exist)
.parent // Page
.parent // Spread
.parent // Document
? true : false
);
$.writeln( doc ===
app.activeDocument // Document
.spreads // Spreads (or goto .pages)
.item(0) // Spread
.pages // Pages
.item(0) // Page
.textFrames // TextFrames
.item(0) // TextFrame
.paragraphs // Paragraphs
.item(0) // Paragraph
.parentStory // Story
.parent // Document
? true : false
);
var doc = app.activeDocument;
$.writeln( doc ===
app.activeDocument // Document
.stories // Stories
.item(0) // Story
.paragraphs // Paragraphs
.item(0) // Paragraph
.parentTextFrames[0] // TextFrame (itemメソッドは無い)
.parent // Page
.parent // Spread
.parent // Document
? true : false
);
$.writeln( doc ===
app.activeDocument // Document
.spreads // Spreads (Document.pagesも可)
.item(0) // Spread
.pages // Pages
.item(0) // Page
.textFrames // TextFrames
.item(0) // TextFrame
.paragraphs // Paragraphs
.item(0) // Paragraph
.parentStory // Story
.parent // Document
? true : false
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment