Skip navigation
Currently Being Moderated

With CS3, some things have changed

May 1, 2007 4:53 AM

Let's use this topic to record changes that are likely to affect a working script. As I did in the CS2 comparable topic, I'll add an index here in the topic title when the list is long enough (and I have the time).
 
Replies 1 2 Previous Next
  • Currently Being Moderated
    May 1, 2007 5:30 AM   in reply to (Dave_Saunders)
    Dave, for the benfeit of those who haven't yet seen documention for CS3's scripting, it is now posted at http://www.adobe.com/devnet/indesign/ included within the 400 megabyte (!) CS3 SDK, the practical reason being that you can now write scripts almost as powerful as plug-ins. My favorite new features so far: Startup Scripts and Custom Labels! Menus and Event Listeners look very promising, too. And XML Rules for the serious crowd...

    [Added by Ole]

    Thanks, Gary. Please note! You can get the scripting documentation and example scripts without having to download the entire SDK from:

    http://www.adobe.com/products/indesign/xml_scripting.html

    Click the (hard to see) Scripting tab to display the scripting info. The page will be updated soon with more information and scripts.
     
    |
    Mark as:
  • Currently Being Moderated
    May 1, 2007 7:41 AM   in reply to (Dave_Saunders)
    In CS2, if you select a number of objects in the UI, then app.selection would reflect the order in which the objects had been selected. app.selection[0] would be the last selected object. In CS3 this is no longer the case: the order of the selected objects reflects their order of creation.

    Peter
     
    |
    Mark as:
  • Currently Being Moderated
    May 1, 2007 11:05 AM   in reply to Peter Kahrel
    someone in Adobe likes to make scripter's life harder ...

    what else ?? ;)

    robin

    --
    www.adobescripts.com
     
    |
    Mark as:
  • Currently Being Moderated
    May 1, 2007 11:33 AM   in reply to (Dave_Saunders)
    Hi Robin,

    Well...we're trying to make it easier, actually. But there are some things we just can't avoid when the underlying architecture changes. Transformations, for example, changed a great deal between CS2 and CS3 because they were completely rewritten. This rewrite brings with it a number of advantages, but it also adds a fair amount of complexity.

    In any case, we've still got script versioning, so that you can continue to use the previous version of the object model if that's what you prefer. I hope that you'll find enough good stuff in the CS3 model to make it worth upgrading--grep, events, menu scripting, XML rules, and performance improvements seem like pretty compelling arguments, to me.:-)

    Thanks,

    Ole
     
    |
    Mark as:
  • Currently Being Moderated
    May 1, 2007 2:22 PM   in reply to (Olav_Kvern)
    > Well...we're trying to make it easier, actually.
    > But there are some things we just can't avoid
    > when the underlying architecture changes.
    > Transformations, for example, changed a great
    > deal between CS2 and CS3 because they were
    > completely rewritten. This rewrite brings with
    > it a number of advantages, but it also adds
    > a fair amount of complexity.

    I refer to two "news" about what was changed:

    1) Dave's info about Story.textContainers isn't collection anymore - WHY ?? why now will be better ?? if this was changed - why all other collections weren't "uncollected", too ;)

    2) Peter's info about ordering of selected objects - somebody in Adobe does this intentionally - so obviously he knew what he was doing - but WHY ?? why index of creation will be better than order of selection ?? why creation index wasn't added as one more property ??

    maybe all changes - should be discused with scripters and accepted by them ?? ;)

    I don't want to be rude - I only want to know - if somebody could say - why there are so big - and controversial - changes ...

    Olav - there is no ScriptingReference on Adobe.com, there is no ScriptingReference in SDK CS3 - where/when it will be available, please ...

    robin

    --
    www.adobescripts.com
     
    |
    Mark as:
  • Currently Being Moderated
    May 1, 2007 6:11 PM   in reply to (Dave_Saunders)
    Hi Robin,

    re: "1) Dave's info about Story.textContainers isn't collection anymore - WHY ?? why now will be better ?? if this was changed - why all other collections weren't "uncollected", too."

    No, we'd rather have it be a collection--it's just that there wasn't time to make it a collection. We were trying to respond to criticism that Story.TextFrames ought to return the text frames used as anchored/inline frames in the story (to make it consistent with rectangles, etc.). As I recall, we also had to fix a bug regarding the differences between text frames/text paths in a story.

    re: "2) Peter's info about ordering of selected objects - somebody in Adobe does this intentionally - so obviously he knew what he was doing - but WHY ?? why index of creation will be better than order of selection ?? why creation index wasn't added as one more property ??"

    Again, this wasn't an intentional, designed change. The architecture of selection changed, and scripting simply reflects the underlying order. I agree that it's not ideal! That said, I don't know of too many scripts that rely on the order of selection.

    re: scripting reference

    There is no plan to create a scripting reference PDF. You use VB--I'd expect you'd use the Object Browser to view objects/properties/methods. In previous versions, we've used the reference to attempt to add/fix information--but, this time, we edited the source to add the information to the objects you see in the Object Browser.

    Thanks,

    Ole
     
    |
    Mark as:
  • Currently Being Moderated
    May 2, 2007 1:13 AM   in reply to (Olav_Kvern)
    > That said, I don't know of too many scripts
    > that rely on the order of selection.

    - script to thread separate TextFrames as Story
    - script to convert layout to database - user select TextFrame with title and Rectangle (with photo) and next TextFrame with Description ... yes - this could be done by checking of applied Char/Para styles to texts - but selection order is better - and fastest - way ;)
    - script to reorder objects - last selected object is "reference point"

    robin

    --
    www.adobescripts.com
     
    |
    Mark as:
  • Currently Being Moderated
    May 2, 2007 1:15 AM   in reply to (Dave_Saunders)
    This JavaScript line no longer works in CS3:

    app.palettesVisible = false;

    Does anybody know how to do this in CS3???
     
    |
    Mark as:
  • Currently Being Moderated
    May 2, 2007 1:55 AM   in reply to (Debilo)
    go to http://www.kahrel.plus.com/indesignscripts.html and download "Script dictionary (PDF) CS3"
    there is Panels collection - I think it is what you are looking for ;)

    robin

    --
    www.adobescripts.com
     
    |
    Mark as:
  • Currently Being Moderated
    May 2, 2007 4:25 AM   in reply to (Dave_Saunders)
    Not really a scripting change, but useful for scripters nonetheless:<br />flipping is still done by changing the vertical scale of graphics to a<br />negative value (and rotating if necessary), but as of CS3 this is shown in<br />the UI; CS2 used to just show the absolute value for vertical scale, which<br />could be very confusing.<br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au><br />AppleScript Pro Denver, June 2007 <a href=http://scriptingmatters.com/aspro>
     
    |
    Mark as:
  • Currently Being Moderated
    May 2, 2007 1:58 PM   in reply to (Dave_Saunders)
    t56y5ty
     
    |
    Mark as:
  • Currently Being Moderated
    May 6, 2007 3:01 AM   in reply to (Dave_Saunders)
    CS2's applyStyle() has been split into applyCharacterStyle(stylename) and applyParagraphStyle(stylename, override).

    Peter
     
    |
    Mark as:
  • Currently Being Moderated
    May 6, 2007 2:46 PM   in reply to (Dave_Saunders)
    After racking my brains about why a script was failing I discover that:

    storyOffset returns a number (character offset in story) in CS2 but returns an insertionPoint in CS3.
     
    |
    Mark as:
  • Currently Being Moderated
    May 8, 2007 12:02 AM   in reply to (Dave_Saunders)
    In CS2, this:<br /><br />    tell document 1<br />        tell parent story of text frame "Table frame"<br />            make table<br />        end tell<br />    end tell<br /><br />would make a table enclosing the contents of the story. In CS3, it makes a<br />table at the beginning of the story (or the end, if you target the contents<br />of a text frame). You need to use "convert to table" instead.<br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au><br />AppleScript Pro Denver, June 2007 <a href=http://scriptingmatters.com/aspro>
     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2007 7:13 AM   in reply to (Dave_Saunders)
    Hello,

    I'm working with VBscript.

    Is there a difference between cell.associatedXmlElement in CS2 and CS3?
    All my cells in CS2 had an associatedXmlElement.
    In CS3, my table has an associatedXmlElement, but all its cells don't (The value is Nothing)
    Is this a bug? Is it linked with XML evolution?

    Thanks a lot
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 4, 2007 3:56 AM   in reply to (Dave_Saunders)
    I have a question about CS3 and CS2 compatibility:

    We've got an application wich works (gets text content and saves new one) with CS2 documents (.indd). We use InDesign Server CS2.

    Now we've got to add support of CS3 documents. As I understand, the only way here is to Use InDesign Server CS3. Client InDesign CS3 (seems) opens CS2 documents without problems. Question is: will scripts for InDesign CS3 work correctly with documents created by InDesingn CS2 or are there some issues?
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 7, 2007 7:46 AM   in reply to (Dave_Saunders)
    Hello everybody looks like new version of InDesign CS3 provides us new nice bugs, stuff which has been working in the other versions before. I'm using VB script.

    If you copy, move or duplicate a group of textframes to another document via scripting the textframe options of the textframes in the group are lost and set back to default, only one textframe is keeping the individual options. You have the same problem if you dont group, but select different textframes at once and then copy.

    The second bug is similar, if you have a group of objects containing an image and you set new geometric bounds via scripting the image itself is not moved to the new position, but stays in the old position. If you take the move command (been broken in version CS) it is working.

    The last thing, I can't understand why didn't Adobe fix the bug from CS2, that oXMLElement.PageItems.Count always gives back 0, in CS it was working fine.
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 7, 2007 1:00 PM   in reply to (Dave_Saunders)
    Hi I just upgraded from InDesign 1.5(! Adobe, it would seem would like to forget that this version ever existed). I have a script written in Visual Basic 6 (! I would like to forget that this version of VB ever existed). How do i convert to CS3. I noticed some reference to versioning. Can I use my 1.5 style script for the time being? Where do I find the dll so I can set the correct 'Reference' in VB6? (I downloaded the software).

    A lot of questions, I know, but I basically need to know how to make Scripting w/ VB6 work in InDesign CS3.

    Thanks,
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 15, 2007 4:18 AM   in reply to (Dave_Saunders)
    cornerEffect became cornerOption.

    (You can't help but wonder why they make changes like this)

    Harbs
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 15, 2007 8:04 AM   in reply to (Dave_Saunders)
    Harbs wrote: "(You can't help but wonder why they make changes like this)"

    We can't win. If we leave something named as it was when the UI changes (e.g., "oval" when the UI changed to say "ellipse"), people get upset. If we change something to match the UI (e.g., "effect" to "option"), we upset people.

    The UI designers are always changing the names of things--I assume it's to make the interface better or more consistent. We try to match their terms whenever possible.

    Thanks,

    Ole
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 17, 2007 12:56 PM   in reply to (Olav_Kvern)
    I'm not *really* complaining. I suppose for new scripters it's nice to
    have the terms matching the interface, but I'm trying to write scripts
    which work in CS, CS2, and CS3. I really don't care what the exact
    terminology of what these things are, but to have them work in all
    versions of CS, I have to do a lot of if (app.version...). The less I
    have to do this, the happier I am.

    I appreciate all the hard work. And you can't make everyone happy all
    the time... ;-)

    Harbs
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 17, 2007 1:57 PM   in reply to (Dave_Saunders)
    Hi Harbs,

    Does script versioning make your life any easier?

    Thanks,

    Ole
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2007 3:12 AM   in reply to (Olav_Kvern)
    Sometimes. Maybe I should use it more often, but especially with CS3,
    there are a lot of situations where versioning doesn't work. (Styles to
    name one...)

    Harbs
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 13, 2007 8:07 AM   in reply to (Dave_Saunders)
    Hi to everyone

    does anyone know where to find this:
    ShadowBlendMode, ShadowBlurRadius, ShadowColor, ShadowMode, ShadowNoise, ShadowOpacity, ShadowSpread, ShadowXOffset, ShadowYOffset in CS3?

    I know it is the question but the answer will show changes between CS2 and CS3 - thx

    regards
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 13, 2007 9:17 AM   in reply to (Dave_Saunders)
    They've got snappier names in CS3 but they're harder to find:

    Obj.transparencySettings.dropShadowSetting.angle; .blendMode, etc.

    I don't see a blurRadius, but maybe it has a different name.

    Dave
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 14, 2007 4:59 AM   in reply to (DaveSaunders)
    > I don't see a blurRadius, but maybe it has a different name.
    >
    It's called "size"...

    Harbs
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 20, 2007 4:55 AM   in reply to (Dave_Saunders)
    Here are a couple of examples from a script I wrote last week of placing a library asset. The first is placed on (the active page of) a document:

    >myAsset.placeAsset(myDoc);

    In this second example, the asset is anchored at an insertion point:

    >myAsset.placeAsset(myStory.insertionPoints[myIndex]);

    In CS2, you had to select an insertionPoint to place as an anchored item.

    Dave
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2007 8:00 AM   in reply to (Dave_Saunders)
    Hello,

    I'm working in VB.
    Has anyone tried to convert rows from table into header row?
    It works fine with footer, but doesn't want to convert a row to header.

    Is this a bug? will it soon be fixed?

    Thanks
    Anne Laure
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2007 8:05 AM   in reply to (Dave_Saunders)
    I will be traveling on business beginning Saturday the 13th of October and will have limited access to my email. I will be back in the office on Monday the 22nd of October. For emergencies please contact sales@anodos.gr, or call mob: +30 6977 215264.

    Thank you.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 14, 2007 3:29 PM   in reply to (Dave_Saunders)
    Possibly a silly question here but my CS2 scripts don't work in CS3 at all (just upgraded yesterday) even when there are examples of similar scripts in the CS3 Guide.

    For example:

    myDoc = app.activeDocument;
    var myPage = myDoc.pages.item(0);

    The above script works in CS2 but it gives the error "undefined is not an object" in CS3. There are examples of similar scripts in the CS3 Guide but they don't work either and give the same error when I cut and paste into ExtendScript Toolkit 2. Does anyone have any advice what I should do?
     
    |
    Mark as:
1 2 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)