Last active
December 12, 2016 14:28
-
-
Save cu39/9954526 to your computer and use it in GitHub Desktop.
【InDesign】DocumentからスタートしてDocumentまで戻る【DOM散歩】 ref: http://qiita.com/cu39/items/3f8b857f2d03c7e6163e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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