Skip navigation

With CS2, some things have changed

Apr 25, 2005 12:35 PM

  Latest reply: (DaveSaunders), Aug 20, 2007 4:56 AM
Replies 1 2 Previous Next
  • Currently Being Moderated
    Calculating status...
    Sep 1, 2005 12:43 PM   in reply to (Dave_Saunders)
    The syntax of adding a page reference to an index topic has changed. In effect the first two parameters have been combined.

    Where in CS you would have (leaving out the last two optional parameters PageReferenceLimit and PageNumberStyleOverride, which didn't change):

    myTopic.pageReferences.add(myStory, myIndex, PageReferenceType.currentPage);

    where myStory is the story in which the pagereference is and myIndex the index in the story (storyoffset) where the pagereference is.
    In CS2 this would become:

    myTopic.pageReferences.add(myStory.insertionPoints[myindex], PageReferenceType.currentPage);

    Although formally the first parameter of pageReferences.add is of the type Text, an insertionpoint will be accepted.

    Teus
     
    |
    Mark as:
  • Currently Being Moderated
    Sep 21, 2005 5:11 AM   in reply to (Dave_Saunders)
    Re: pageReference

    You don't need an index or any (direct) reference to a story either. You could cycle through a collection of found items, as in
    myItems = app.activeDocument.search( 'wildebeest' )
    
    for( i = myItems.length-1; i > -1; i-- )
    myTopic.pageReferences.add( myItems[i], pageReferenceType.currentPage )

    Peter
     
    |
    Mark as:
  • Currently Being Moderated
    Sep 21, 2005 8:03 AM   in reply to (Dave_Saunders)
    That's right Peter: in CS2 you only need a parameter sourceText; this can be any text item. I just gave the example to illustrate how to convert CS scripts to CS2.

    Teus
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 31, 2005 2:38 PM   in reply to (Dave_Saunders)
    Hi, I'm looking for an Acrobat patch. Does anybody has one? My InDesign isn't any longer able to read Acrobat. Maybe it is also unable to open QUark. Acro Writer isn't able to write. Several problems. Maybe there is a loss of dates.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 3, 2005 1:27 AM   in reply to (Dave_Saunders)
    Hi I've seen also some changes for the Excel import preferences. On CS you could set the select sheet with:

    iApp.ExcelImportPreferences.SheetName = sheet
    iApp.ExcelImportPreferences.RangeName = range
    iApp.ExcelImportPreferences.DecimalPlaces = 3

    This works no more on CS2. That's really desapointing because it was a great feature for automated import.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 3, 2005 4:03 AM   in reply to (Dave_Saunders)
    Dave,

    You're right, all properties are supported, but they doesn't seem to work as in CS anymore. I tried to run a simple script using this propoerties, it works fine in CS but setting those properties in CS2 is useless. maybe it's a bug.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 3, 2005 5:10 AM   in reply to (Dave_Saunders)
    I tried to add the TableFormattingOptions, but it doesn't change the result. The real problem is when I use the command "Place", Indesign should use the "sheetname", "RangeName",... properties if they have been set previously. But in my case I set all the properties of existing sheets in my excel file, but at the execution of the place command in my script, the import window still open asking me which sheet to import.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 4, 2005 2:46 AM   in reply to (Dave_Saunders)
    Thanks for your script Dave.

    But the problem is the same, because you can't specify the sheet and zone you want to import in your script. It seems I should have a file for each sheet in the excel file :(

    Serge
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 4, 2005 5:36 AM   in reply to (Dave_Saunders)
    Hi Dave

    I finally decided to try make an import in Javascript and it works a lot
    better. I "uncommented" the following lines

    sheetName = "mysheetname";
    rangeName = "xx:yy";

    And it work perfectly well! selecting the right sheet!

    I think there is a problem with the VBS feature. I'll continue in javascript then.

    Thanks for your help.
    Serge
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 8, 2005 8:56 PM   in reply to (Dave_Saunders)
    I am not a scripter but I'm hoping someone can help me with a problem given that it's likely to be small. The script below works in version 2.0 but not version CS2. This handy little thing saves me hours of work!

    Any help is very much appreciated.

    tell application "Adobe InDesign CS2"
    tell document 1
    set theSelection to selection

    repeat with anItem in theSelection
    set theTarget to anItem
    set theClass to class of theTarget
    if theClass is in {EPS, PDF} then -- if the image is selected by direct tools
    set theTarget to parent of anItem
    end if

    if page item 1 of theTarget exists then
    tell theTarget
    «event K2 fitc» given «class givn»:content to frame
    set horScale to round (horizontal scale of page item 1) + 0.5
    -- add 0.5 %
    set vertScale to round (vertical scale of page item 1) + 0.5
    -- add 0.5 %

    if horScale is greater than vertScale then
    set vertical scale of page item 1 to horScale
    set horizontal scale of page item 1 to horScale
    else
    set horizontal scale of page item 1 to vertScale
    set vertical scale of page item 1 to vertScale
    end if
    «event K2 fitc» given «class givn»:center content
    end tell
    end if
    end repeat
    end tell
    end tell
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 8, 2005 9:50 PM   in reply to (Dave_Saunders)
    tell application "Adobe InDesign CS2"<br />    set theSelection to selection<br />    <br />    repeat with anItem in theSelection<br />        set theTarget to anItem<br />        if exists graphic 1 of theTarget then<br />            set theTarget to graphic 1 of theTarget<br />        else<br />            set theClass to class of theTarget<br />            if theClass is not in {EPS, PDF} then<br />                set theTarget to {}<br />            end if<br />        end if<br />        if theTarget is not {} then<br />            tell theTarget<br />                fit parent given fill proportionally<br />                set horScale to round (horizontal scale) + 0.5<br />                -- add 0.5 %<br />                set vertical scale to horScale<br />                set horizontal scale to horScale<br />                fit parent given center content<br />            end tell<br />        end if<br />    end repeat<br />end tell<br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au>
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2005 6:31 PM   in reply to (Dave_Saunders)
    Thanks Shane. People like you make the world a better place!
     
    |
    Mark as:
  • Currently Being Moderated
    Jan 25, 2006 7:35 AM   in reply to (Dave_Saunders)
    I couldn't find any of the commands for dealing with InCopy stories in the scripting reference. Commands like check in and check out. I looked under Links and under Stories and did a search for InCopy. Am I looking for the wrong thing?

    ID has made it easy to export all stories to InCopy, but it doesn't make it easy to unlink. You have to select all the stories in the links pallet, choose check out and then unlink. It doesn't seem like much, but if you have 40 documents with multiple InCopy stories each, it can be time consuming. There is also no way to do a global check out of all IC stories in all the open documents which would be handy for making global changes like changing a font or doing an all documents find/replace.
     
    |
    Mark as:
  • Currently Being Moderated
    Feb 12, 2006 7:10 AM   in reply to (Dave_Saunders)
    duplicate() has changed. In CS2 you can now add an offset to duplicate an object at a certain position. To duplicate an object and move the duplicate 4cm to the right and 3cm down, this can be done with one statement in CS2:
    myObject.duplicate(['3cm',4cm'])
    

    In CS1 you need two steps: duplicate and move:
    myObject.duplicate()
    
    myObject.move(undefined,['3cm',4cm'])

    Peter
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 31, 2006 5:57 AM   in reply to (Dave_Saunders)
    Is there a breakdown on the change of syntax for AppleScript as well? I have run into a few problems with updating scripts for CS2, and while I have been able to find the solutions with the help of this thread and the scripting guide the latest one I don't see a reference to. Specifically making an inline graphic (rectangle) in the text flow is not working in CS2.
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 20, 2007 4:23 AM   in reply to (Dave_Saunders)
    can u tell how to place assets in a library using adobe indesign CS3
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 20, 2007 4:56 AM   in reply to (Dave_Saunders)
    I answered in the topic: With CS3, some things have changed.

    Dave
     
    |
    Mark as:
1 2 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)