Skip navigation
Currently Being Moderated

JavaScript: changes from CS5.5 to CS6

Apr 29, 2012 11:37 AM

Removed

Classes

FolioBindingDirectionOptions (enum)

FolioOrientationOptions (enum)

SmoothScrollingOptions (enum)

SpaceUnitType (enum)

VisibilityInPdf (enum)

Properties

Button.visibilityInPdf

DocumentPreference.masterTextFrame

DocumentPreset.masterTextFrame

EPubExportPreference.marginUnit

EPubExportPreference.spaceUnit

EPubExportPreference.format

EPubExportPreference.useTocStyle

EPubExportPreference.cssExportOption

EPubExportPreference.externalCSSPath

HTMLExportPreference.leftMargin

HTMLExportPreference.rightMargin

HTMLExportPreference.topMargin

HTMLExportPreference.bottomMargin

HTMLExportPreference.marginUnit

HTMLExportPreference.spaceUnit

HTMLExportPreference.externalCSSPath

HTMLExportPreference.linkToJavascript

HTMLExportPreference.javascriptURL

ObjectExportOption.customImageAlignment

ObjectExportOption.spaceUnit

PagesPanel.verticalView

StyleSheetExportOption.STYLE_NAME_ONLY

StyleSheetExportOption.EXTERNAL_CSS

Methods

Application.rasterizeDocumentPage()

Application.exportMiniFolio()

Application.exportFolioToPackage()

Application.exportFolioToDirectory()

Application.exportFolioToDirectoryPackage()

Application.getAllOverlays()

Application.createCustomMiniFolio()

Application.areFilePathsEquivalent()

Added

Classes

AutoSizingReferenceEnum (enum)

AutoSizingTypeEnum (enum)

CellStyleMapping

CellStyleMappings

CharStyleMapping

CharStyleMappings

CheckBox

CheckBoxes

ClearFormBehavior

ClearFormBehaviors

ComboBox

ComboBoxes

ContentPlacerObject

CustomLayoutTypeEnum (enum)

DimensionsConstraints (enum)

EpubVersion (enum)

FontLockingPreference

GuideTypeOptions (enum)

HtmlItem

HtmlItems

LayoutRuleOptions (enum)

LinkedPageItemOption

ListBox

ListBoxes

MapType (enum)

PNGColorSpaceEnum (enum)

PNGExportPreference

PNGExportRangeEnum (enum)

PNGQualityEnum (enum)

PageViewOptions (enum)

PaginationOption (enum)

ParaStyleMapping

ParaStyleMappings

PreviewPagesOptions (enum)

PrintFormBehavior

PrintFormBehaviors

RadioButton

RadioButtons

SignatureField

SignatureFields

SnapshotBlendingModes (enum)

StaticAlignmentOptions (enum)

SubmitFormBehavior

SubmitFormBehaviors

TableStyleMapping

TableStyleMappings

TextBox

TextBoxes

Properties

AlignDistributeBounds.KEY_OBJECT

Application.linkedPageItemOptions

Application.pngExportPreferences

Application.contentPlacer

Application.fontLockingPreferences

Application.paraStyleMappings

Application.charStyleMappings

Application.tableStyleMappings

Application.cellStyleMappings

Application.selectionKeyObject

Button.linkedPageItemOptions

Button.submitFormBehaviors

Button.clearFormBehaviors

Button.printFormBehaviors

Button.printableInPdf

Button.hiddenUntilTriggered

Button.horizontalLayoutConstraints

Button.verticalLayoutConstraints

Cell.checkBoxes

Cell.comboBoxes

Cell.listBoxes

Cell.radioButtons

Cell.textBoxes

Cell.signatureFields

ChangeGrepPreference.paragraphKashidaWidth

ChangeObjectPreference.autoSizingType

ChangeObjectPreference.autoSizingReferencePoint

ChangeObjectPreference.useMinimumHeightForAutoSizing

ChangeObjectPreference.minimumHeightForAutoSizing

ChangeObjectPreference.useMinimumWidthForAutoSizing

ChangeObjectPreference.minimumWidthForAutoSizing

ChangeObjectPreference.useNoLineBreaksForAutoSizing

ChangeTextPreference.paragraphKashidaWidth

Character.checkBoxes

Character.comboBoxes

Character.listBoxes

Character.radioButtons

Character.textBoxes

Character.signatureFields

Character.paragraphKashidaWidth

CoordinateSpaces.PAGE_COORDINATES

DiacriticPositionOptions.OPENTYPE_POSITION_FROM_BASELINE

Document.linkedPageItemOptions

Document.paraStyleMappings

Document.charStyleMappings

Document.tableStyleMappings

Document.cellStyleMappings

Document.checkBoxes

Document.comboBoxes

Document.listBoxes

Document.radioButtons

Document.textBoxes

Document.signatureFields

Document.selectionKeyObject

DocumentIntentOptions.DPS_INTENT

DocumentPreference.createPrimaryTextFrame

DocumentPreset.createPrimaryTextFrame

EPS.linkedPageItemOptions

EPS.horizontalLayoutConstraints

EPS.verticalLayoutConstraints

EPSText.linkedPageItemOptions

EPSText.horizontalLayoutConstraints

EPSText.verticalLayoutConstraints

EPubExportPreference.externalStyleSheets

EPubExportPreference.javascripts

EPubExportPreference.version

FindChangeTransliterateCharacterTypes.WESTERN_ARABIC_DIGITS

FindChangeTransliterateCharacterTypes.ARABIC_INDIC_DIGITS

FindChangeTransliterateCharacterTypes.FARSI_DIGITS

FindGrepPreference.paragraphKashidaWidth

FindObjectPreference.autoSizingType

FindObjectPreference.autoSizingReferencePoint

FindObjectPreference.useMinimumHeightForAutoSizing

FindObjectPreference.minimumHeightForAutoSizing

FindObjectPreference.useMinimumWidthForAutoSizing

FindObjectPreference.minimumWidthForAutoSizing

FindObjectPreference.useNoLineBreaksForAutoSizing

FindTextPreference.paragraphKashidaWidth

FormField.linkedPageItemOptions

FormField.horizontalLayoutConstraints

FormField.verticalLayoutConstraints

GeneralPreference.mainMonitorPpi

GeneralPreference.greekVectorGraphicsOnDrag

GeneralPreference.showConveyor

GeneralPreference.createLinksOnContentPlace

GeneralPreference.mapStylesOnContentPlace

GeneralPreference.useCustomMonitorResolution

GeneralPreference.customMonitorPpi

GeneralPreference.previewPages

Graphic.linkedPageItemOptions

Graphic.horizontalLayoutConstraints

Graphic.verticalLayoutConstraints

GraphicLine.linkedPageItemOptions

GraphicLine.htmlItems

GraphicLine.checkBoxes

GraphicLine.comboBoxes

GraphicLine.listBoxes

GraphicLine.radioButtons

GraphicLine.textBoxes

GraphicLine.signatureFields

GraphicLine.horizontalLayoutConstraints

GraphicLine.verticalLayoutConstraints

Group.linkedPageItemOptions

Group.checkBoxes

Group.comboBoxes

Group.listBoxes

Group.radioButtons

Group.textBoxes

Group.signatureFields

Group.horizontalLayoutConstraints

Group.verticalLayoutConstraints

Guide.guideType

Guide.guideZone

HTMLExportPreference.externalStyleSheets

HTMLExportPreference.javascripts

IMEPreference.useNativeDigits

Image.linkedPageItemOptions

Image.horizontalLayoutConstraints

Image.verticalLayoutConstraints

ImportedPage.linkedPageItemOptions

ImportedPage.horizontalLayoutConstraints

ImportedPage.verticalLayoutConstraints

InsertionPoint.checkBoxes

InsertionPoint.comboBoxes

InsertionPoint.listBoxes

InsertionPoint.radioButtons

InsertionPoint.textBoxes

InsertionPoint.signatureFields

InsertionPoint.paragraphKashidaWidth

InteractivePDFExportPreference.usePDFStructureForTabOrder

LanguageAndRegion.INDIC

Layer.checkBoxes

Layer.comboBoxes

Layer.listBoxes

Layer.radioButtons

Layer.textBoxes

Layer.signatureFields

LayoutWindow.selectionKeyObject

Line.checkBoxes

Line.comboBoxes

Line.listBoxes

Line.radioButtons

Line.textBoxes

Line.signatureFields

Line.paragraphKashidaWidth

LinkedStoryOption.applyStyleMappings

MasterSpread.checkBoxes

MasterSpread.comboBoxes

MasterSpread.listBoxes

MasterSpread.radioButtons

MasterSpread.textBoxes

MasterSpread.signatureFields

MasterSpread.primaryTextFrame

MediaItem.linkedPageItemOptions

MediaItem.horizontalLayoutConstraints

MediaItem.verticalLayoutConstraints

Movie.linkedPageItemOptions

Movie.horizontalLayoutConstraints

Movie.verticalLayoutConstraints

MultiStateObject.linkedPageItemOptions

MultiStateObject.horizontalLayoutConstraints

MultiStateObject.verticalLayoutConstraints

ObjectExportOption.customLayout

ObjectExportOption.customLayoutType

ObjectStyle.enableTextFrameAutoSizingOptions

Oval.linkedPageItemOptions

Oval.htmlItems

Oval.checkBoxes

Oval.comboBoxes

Oval.listBoxes

Oval.radioButtons

Oval.textBoxes

Oval.signatureFields

Oval.horizontalLayoutConstraints

Oval.verticalLayoutConstraints

PDF.linkedPageItemOptions

PDF.horizontalLayoutConstraints

PDF.verticalLayoutConstraints

PDFColorSpace.GRAY

PICT.linkedPageItemOptions

PICT.horizontalLayoutConstraints

PICT.verticalLayoutConstraints

Page.appliedAlternateLayout

Page.checkBoxes

Page.comboBoxes

Page.listBoxes

Page.radioButtons

Page.textBoxes

Page.signatureFields

Page.layoutRule

Page.snapshotBlendingMode

Page.optionalPage

PageItem.linkedPageItemOptions

PageItem.horizontalLayoutConstraints

PageItem.verticalLayoutConstraints

Paragraph.checkBoxes

Paragraph.comboBoxes

Paragraph.listBoxes

Paragraph.radioButtons

Paragraph.textBoxes

Paragraph.signatureFields

Paragraph.paragraphKashidaWidth

ParagraphJustificationOptions.NASKH_TATWEEL_JUSTIFICATION

ParagraphJustificationOptions.NASKH_KASHIDA_JUSTIFICATION

ParagraphJustificationOptions.NASKH_TATWEEL_JUSTIFICATION_FRAC

ParagraphJustificationOptions.NASKH_KASHIDA_JUSTIFICATION_FRAC

ParagraphStyle.paragraphKashidaWidth

PlaceGun.checkBoxes

PlaceGun.comboBoxes

PlaceGun.listBoxes

PlaceGun.radioButtons

PlaceGun.textBoxes

PlaceGun.signatureFields

Polygon.linkedPageItemOptions

Polygon.htmlItems

Polygon.checkBoxes

Polygon.comboBoxes

Polygon.listBoxes

Polygon.radioButtons

Polygon.textBoxes

Polygon.signatureFields

Polygon.horizontalLayoutConstraints

Polygon.verticalLayoutConstraints

Rectangle.linkedPageItemOptions

Rectangle.htmlItems

Rectangle.checkBoxes

Rectangle.comboBoxes

Rectangle.listBoxes

Rectangle.radioButtons

Rectangle.textBoxes

Rectangle.signatureFields

Rectangle.horizontalLayoutConstraints

Rectangle.verticalLayoutConstraints

Section.alternateLayoutLength

Section.alternateLayout

Section.pagination

Section.paginationMaster

SelectionOptions.SET_KEY

Snippet.checkBoxes

Snippet.comboBoxes

Snippet.listBoxes

Snippet.radioButtons

Snippet.textBoxes

Snippet.signatureFields

Sound.linkedPageItemOptions

Sound.horizontalLayoutConstraints

Sound.verticalLayoutConstraints

SplineItem.linkedPageItemOptions

SplineItem.htmlItems

SplineItem.checkBoxes

SplineItem.comboBoxes

SplineItem.listBoxes

SplineItem.radioButtons

SplineItem.textBoxes

SplineItem.signatureFields

SplineItem.horizontalLayoutConstraints

SplineItem.verticalLayoutConstraints

Spread.checkBoxes

Spread.comboBoxes

Spread.listBoxes

Spread.radioButtons

Spread.textBoxes

Spread.signatureFields

StateTypes.UP_ON

StateTypes.ROLLOVER_ON

StateTypes.DOWN_ON

StateTypes.UP_OFF

StateTypes.ROLLOVER_OFF

StateTypes.DOWN_OFF

StaticText.staticAlignment

Story.paraStyleMappings

Story.charStyleMappings

Story.tableStyleMappings

Story.cellStyleMappings

Story.checkBoxes

Story.comboBoxes

Story.listBoxes

Story.radioButtons

Story.textBoxes

Story.signatureFields

Story.paragraphKashidaWidth

StoryWindow.selectionKeyObject

StyleExportTagMap.splitDocument

Table.checkBoxes

Table.comboBoxes

Table.listBoxes

Table.radioButtons

Table.textBoxes

Table.signatureFields

TagTextExportCharacterSet.CENTRALEUROPEAN_ISO

TagTextExportCharacterSet.CYRILLIC_ISO

TagTextExportCharacterSet.GREEK_ISO

TagTextExportCharacterSet.WINDOWS_ARABIC

TagTextExportCharacterSet.WINDOWS_HEBREW

Text.checkBoxes

Text.comboBoxes

Text.listBoxes

Text.radioButtons

Text.textBoxes

Text.signatureFields

Text.paragraphKashidaWidth

TextColumn.checkBoxes

TextColumn.comboBoxes

TextColumn.listBoxes

TextColumn.radioButtons

TextColumn.textBoxes

TextColumn.signatureFields

TextColumn.paragraphKashidaWidth

TextDefault.paragraphKashidaWidth

TextFrame.objectExportOptions

TextFrame.linkedPageItemOptions

TextFrame.checkBoxes

TextFrame.comboBoxes

TextFrame.listBoxes

TextFrame.radioButtons

TextFrame.textBoxes

TextFrame.signatureFields

TextFrame.horizontalLayoutConstraints

TextFrame.verticalLayoutConstraints

TextFrameContents.PLACEHOLDER_TEXT_ARABIC

TextFrameContents.PLACEHOLDER_TEXT_HEBREW

TextFrameContents.PLACEHOLDER_TEXT_CYRILLIC

TextFrameContents.PLACEHOLDER_TEXT_GREEK

TextFramePreference.useFlexibleColumnWidth

TextFramePreference.textColumnMaxWidth

TextFramePreference.autoSizingType

TextFramePreference.autoSizingReferencePoint

TextFramePreference.useMinimumHeightForAutoSizing

TextFramePreference.minimumHeightForAutoSizing

TextFramePreference.useMinimumWidthForAutoSizing

TextFramePreference.minimumWidthForAutoSizing

TextFramePreference.useNoLineBreaksForAutoSizing

TextImportCharacterSet.MACINTOSH_GREEK_SHARED_CAPS

TextImportCharacterSet.MACINTOSH_ARABIC

TextImportCharacterSet.MACINTOSH_HEBREW

TextImportCharacterSet.WINDOWS_ARABIC

TextImportCharacterSet.WINDOWS_HEBREW

TextImportCharacterSet.ARABIC_ASMO

TextImportCharacterSet.ARABIC_ASMO_TRANSPARENT

TextPreference.quoteCharactersRotatedInVertical

TextStyleRange.checkBoxes

TextStyleRange.comboBoxes

TextStyleRange.listBoxes

TextStyleRange.radioButtons

TextStyleRange.textBoxes

TextStyleRange.signatureFields

TextStyleRange.paragraphKashidaWidth

WMF.linkedPageItemOptions

WMF.horizontalLayoutConstraints

WMF.verticalLayoutConstraints

Window.selectionKeyObject

Word.checkBoxes

Word.comboBoxes

Word.listBoxes

Word.radioButtons

Word.textBoxes

Word.signatureFields

Word.paragraphKashidaWidth

XmlStory.paraStyleMappings

XmlStory.charStyleMappings

XmlStory.tableStyleMappings

XmlStory.cellStyleMappings

XmlStory.checkBoxes

XmlStory.comboBoxes

XmlStory.listBoxes

XmlStory.radioButtons

XmlStory.textBoxes

XmlStory.signatureFields

XmlStory.paragraphKashidaWidth

Methods

Button.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles ][,showingOptions])

Document.createAlternateLayout(spreadItems,name,width,height,createTex tStyles,linkTextStories,layoutRule)

Document.deleteAlternateLayout(name)

EPS.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][, showingOptions])

EPSText.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyle s][,showingOptions])

FormField.contentPlace(pageItems[,linkPageItems][,linkStories][,mapSty les][,showingOptions])

Graphic.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyle s][,showingOptions])

GraphicLine.contentPlace(pageItems[,linkPageItems][,linkStories][,mapS tyles][,showingOptions])

Group.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles] [,showingOptions])

Guide.transformValuesOf(in)

Guide.resolve(location,in[,consideringRulerUnits])

Image.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles] [,showingOptions])

ImportedPage.contentPlace(pageItems[,linkPageItems][,linkStories][,map Styles][,showingOptions])

Link.goToSource()

MasterSpread.contentPlace(pageItems[,linkPageItems][,linkStories][,map Styles][,placePoint][,destinationLayer][,showingOptions])

MediaItem.contentPlace(pageItems[,linkPageItems][,linkStories][,mapSty les][,showingOptions])

Movie.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles] [,showingOptions])

MultiStateObject.contentPlace(pageItems[,linkPageItems][,linkStories][ ,mapStyles][,showingOptions])

Oval.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][ ,showingOptions])

PDF.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][, showingOptions])

PICT.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][ ,showingOptions])

Page.snapshotCurrentLayout()

Page.deleteLayoutSnapshot()

Page.deleteAllLayoutSnapshots()

Page.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][ ,placePoint][,destinationLayer][,showingOptions])

PageItem.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyl es][,showingOptions])

Polygon.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyle s][,showingOptions])

Rectangle.contentPlace(pageItems[,linkPageItems][,linkStories][,mapSty les][,showingOptions])

Sound.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles] [,showingOptions])

SplineItem.contentPlace(pageItems[,linkPageItems][,linkStories][,mapSt yles][,showingOptions])

Spread.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles ][,placePoint][,destinationLayer][,showingOptions])

TextFrame.contentPlace(pageItems[,linkPageItems][,linkStories][,mapSty les][,showingOptions])

WMF.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][, showingOptions])

Changed methods

Application.dumpFromMemoryMark(Array of from)

Application.dumpBetweenMemoryMarks(Array of from,Array of to)

Button.extractLabel(key)

Document.align(alignDistributeItems,alignOption[,alignDistributeBounds ][,reference])

Document.distribute(alignDistributeItems,distributeOption[,alignDistri buteBounds][,useDistributeMeasurement][,absoluteDistributeMeasurement][,reference])

EPS.extractLabel(key)

EPSText.extractLabel(key)

FormField.extractLabel(key)

Graphic.extractLabel(key)

GraphicLine.extractLabel(key)

Group.extractLabel(key)

Image.extractLabel(key)

ImportedPage.extractLabel(key)

MediaItem.extractLabel(key)

Movie.extractLabel(key)

MultiStateObject.extractLabel(key)

Oval.extractLabel(key)

PDF.extractLabel(key)

PICT.extractLabel(key)

PageItem.extractLabel(key)

Polygon.extractLabel(key)

Rectangle.extractLabel(key)

Sound.extractLabel(key)

SplineItem.extractLabel(key)

TextFrame.extractLabel(key)

WMF.extractLabel(key)

Branched to a new discussion.
 
Replies
  • Currently Being Moderated
    Apr 29, 2012 11:50 AM   in reply to [Jongware]

    Awesome stuff!

     

    I see you're putting those omv files I sent you to good use...

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 29, 2012 5:27 PM   in reply to [Jongware]

    Thanks a lot

     

    No time to dig further but I also noticed two additions in the CS6 scriptui.xml prerelease file:

     

    1) The EditText creation properties now include wantReturn, which only applies to multiple line edit controls in ScriptUI Version 6.0 or later. When true the RETURN/ENTER keystroke is considered as text-input advancing the cursor to the next line. The default value is false.

     

    2) Also, the ListBox.columns property has a new inner parameter, visible, described as an array of boolean visible attributes, whose length matches the number of columns specified at creation. This property can be used to show/hide a column. Avaiblable in ScriptUI Version 6.0 or later provided ScriptUI.frameworkName == 'Flex'.

     

    What puzzles me a lot is the condition: ScriptUI.frameworkName == 'Flex'

     

    Is this documented in the final release?

     

    @+

    Marc

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 29, 2012 6:08 PM   in reply to [Jongware]

    .. and now, you can no longer do that for a range of objects!!

     

    Which is the same behavior as in InDesign CS4.

    C'mon, Adobe, change that back again to the CS5 and CS5.5 behavior…

     

    Uwe

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 29, 2012 6:15 PM   in reply to Laubender

    Laubender wrote:

     

    .. and now, you can no longer do that for a range of objects!!

     

    Which is the same behavior as in InDesign CS4.

    C'mon, Adobe, change that back again to the CS5 and CS5.5 behavior…

     

    Uwe

    FWIW, I believe the original choice was made in the interests of a basic level of data privacy -- you couldn't get the value for a key without knowing the key. Not water-tight, but also not without its virtues.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 29, 2012 11:35 PM   in reply to Marc Autret

    ScriptUI has been based on Flash starting from CS5. That probably has something to do with the "ScriptUI.frameworkName == 'Flex'". AFAIK, that's not something that's changeable.

     

    Harbs

     
    |
    Mark as:
  • John Hawkinson
    5,572 posts
    Jun 25, 2009
    Currently Being Moderated
    Apr 30, 2012 12:21 AM   in reply to [Jongware]

    Jongware wrote:

    Removed

    Classes

    FolioBindingDirectionOptions (enum)

    FolioOrientationOptions (enum)

    So, these and some of the others are because the DPS plugin was installed in your CS5.5 installation, and not because of changes to the CS6 DOM. I found it more useful to compare the 8.0$7.5 file with the 8.0$8.0 file. (I did a manual comparison of 8.0$7.5 with 7.5$7.5 first to be safe!).

     
    |
    Mark as:
  • John Hawkinson
    5,572 posts
    Jun 25, 2009
    Currently Being Moderated
    Apr 30, 2012 12:22 AM   in reply to [Jongware]

    Wow, I almost get the impression you like writing long painful XSLT

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 30, 2012 12:38 AM   in reply to John Hawkinson

    So, these and some of the others are because the DPS plugin was installed in your CS5.5 installation

     

    I thought so.

    Removed

    Classes

    SmoothScrollingOptions (enum)

    might get in here, too…
    That are enumerations for DPS belonging to articles (MiniFolios) without the fixed page 4:3 ratio.

     

    As well as all (?) removed methods:

     

    Removed

    Methods

    Application.rasterizeDocumentPage()

    Application.exportMiniFolio()

    Application.exportFolioToPackage()

    Application.exportFolioToDirectory()

    Application.exportFolioToDirectoryPackage()

    Application.getAllOverlays()

    Application.createCustomMiniFolio()

    Application.areFilePathsEquivalent()

     

    With "Application.rasterizeDocumentPage()" and "Application.areFilePathsEquivalent()" I'm not sure…

     

    Uwe

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 30, 2012 8:51 AM   in reply to [Jongware]

    Yeah, well, last time 'round it seemed those little changes were only dripping in one at a time. I thought, why not get a comprehensive list right from the start.

     

    One that is sure to bite some scripters is this. In CS5.5, you could get a list of labels:

     

    extractLabel ([key: string])

    Gets the label value associated with the specified key. If key string is null, then a list of key-value pairs associated with the item is returned.

     

    .. and now, you can no longer do that for a range of objects!!

     

    extractLabel (key: string)

    Gets the label value associated with the specified key.

     

    See? No longer "Optional"! See the list above for objects that no longer support this.

     

     

     

    For all those scripters whom this might bite. Harbs wrote this wonderful piece of code for me a while back which does exactly what obj.extractLabel() would do without using it! It's fantastic.

     

     

    var vals = GetValuePairs(obj);
    for(var x in vals)
    {
              myString+= x + " => " + vals[x]+"\n";
    }
     
    alert(myString)
     
    function GetValuePairs(obj){
              var file = File(Folder.temp + "/temp.idms");
              obj.exportFile(ExportFormat.INDESIGN_SNIPPET,file);
              file.open('r');
              var contents = file.read();
              file.close();
              var contXML = XML(contents);
              var vals = {}
              for each(var pair in contXML..KeyValuePair){
                        vals[pair.@Key] = pair.@Value;
              }
              return vals;
    }
     
    
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)