Skip to main content
Inspiring
October 19, 2008
Question

With CS4, some things have changed

  • October 19, 2008
  • 25 replies
  • 16887 views
This topic is not about new features but changes, primarily in the object model, that will affect scripts that run perfectly well under CS3.

Bear in mind that as before, you can create a folder for previous version scripts and run from there, in which case the previous object model is employed -- indeed, CS4 allows you to do this for scripts all the way back to CS scripts. The Object Model Viewer in ESTK, once you've initialized it by opening it once and choosing the InDesign CS4 Object Model, allows you to see all four supported object models.
This topic has been closed for replies.

25 replies

Known Participant
March 4, 2009
Hi Ian,

What that probably means is that there are differences in the Word/RTF import preferences between the two installations--have you compared those?

Thanks,

Ole
Participating Frequently
March 4, 2009
I don't know if this is applicable here but can anyone throw some light on the MS Word import.

We have it working fine on Server CS3 just fine but not on Server CS4. It only imports text formatting, not tables, images, etc. And if it comes across, say an image first it fails to import anything else.

I can't find any documentation/threads on this as yet. So any pointers greatly appreciated.

ta!
Participant
February 6, 2009
I guess not too many scripts will have problems with this change, but you never know:

You have a document with 2 facing pages, and they are not allowed to shuffle like this [1-2].

Now you use in VB the command:

oDocument.Spreads.Add

In all previous CS Versions, InDesign created a new Spread consisting of 2 facing pages 3-4. 3 is a left page and 4 a right page. As I wanted

Now in CS4 you get as well 2 new pages, but they are not facing. Page 3 is a right page and page 4 is a single left page.

So my solution just adding 2 new spreads, take the pages you want to keep toghether disable shuffling and delete the unused pages.

Christoph
Inspiring
November 2, 2008
The Text.appliedNestedStyle property has been changed to:

Text.appliedNestedStyles

because a character can now have more than one character style applied by nesting.

Dave
Peter Kahrel
Community Expert
Community Expert
October 29, 2008
>Nobody reads message 1.

Groan... Sorry about that! I read it at the time and forgot about it, too.

Peter
Inspiring
October 29, 2008
Nobody reads message 1.

Dave
Peter Kahrel
Community Expert
Community Expert
October 29, 2008
Ole,

Well, I ran a CS3 script in CS4 that contained a line with ...textWrapType = TextWrapTypes..., which errored out on that line. Looked up "textWrapType" in the OMV but it wasn't listed there, and found textWrapMode instead. After changing that, the script ran fine in CS4.

Peter
Known Participant
October 29, 2008
Hi Peter,

I'm pretty certain that that change has to do with a language-specific problem--probably an AppleScript term conflict.

Thanks,

Ole
Peter Kahrel
Community Expert
Community Expert
October 29, 2008
textWrapType(s) is now textWrapMode(s)

So instead of this:
>myObj.textWrapPreferences.textWrapType = TextWrapTypes.jumpObjectTextWrap

You need this:
>myObj.textWrapPreferences.textWrapMode = TextWrapModes.jumpObjectTextWrap

Seems a rather awkward thing to change.

Peter
Inspiring
October 25, 2008
In CS3, the object class for a page imported from another InDesign document was:

ImportedPage

but the name of its collection class was:

IndesignPageItems

and the corresponding properties followed this naming convention. Thus, for example:

myRectangle.indesignPageItems

In CS4, this inconsistency has been fixed. The collection is now properly named:

ImportedPages

and the corresponding properties are also renamed:

myRectangle.importedPages

Dave