Hi.
I am looking for some clarifications with syntax when coding for InDesign using Javascript. I constantly find myself using 2 or 3 different ways to use the code before I either find the correct way, or lookup and old script, or posting on here.
I generally have the right ideas, and am using the right functions, but at times try them in the wrong way.
For example:
why is this written...
app.activeDocument.layoutWindows[0].screenMode = ScreenModeOptions.PREVIEW_TO_SLUG;
Roy,
"ScreenModeOptions.PREVIEW_TO_SLUG" is equivalent to "ScreenModeOptions.previewToSlug" -- they're just notational variants. The first format is what the ESTK uses, the second one is more generally JavaScript convention.
({x: y}) is the format used e.g. when you create an object:
myPage.textFrames.add ({geometricBounds: myBounds, contents: "Blah"});
Peter