Hi,
I’m trying to work with InDesign documents so that I can resize text frames using Applescript. These text boxes are associated with master spreads. Some are already overridden and some are not. I tried to do an if/then statement such that:
tell application “Adobe InDesign CS2”
tell document 1
set myPages to every page
repeat with i from 1 to (count of myPages)
set thePage to page i
set isOverridden to overridden of item 5 of page i
try
if isOverridden is false then
set theSpread to applied master of thePage
override page item 5 of theSpread destination page thePage
end if
end try
end repeat
end tell
end tell
I found that I cannot get the line “set isOverridden to overridden of item 5 of page i” to work. I get an error that says “Adobe InDesign CS2 got an error: Can’t get overridden of item 5 of page 1 of document 1.” I tried just that line by itself and it still would not work. Funny thing is I copied that line directly from Shirley Hopkins book “Applescripting InDesign”, written for CS and Panther. I’m on CS2 and Tiger. Could that be a problem? I’ve noticed other broken statements in InDesign, but could do workarounds for them.
Okay, thanks. Any help is appreciated