Release: InData 2/3.1.1 for InDesign 2/CS

October 5, 2004 by

This set of releases fixes a whole raft of bugs, and adds features such as full Unicode support and scripting access to header updating.

Changes at 2/3.1.1 release

  • Fixed a problem where scaling images using Size to Fit Horizontally, then Size Frame Vertically was occasionally failing.
  • Fixed a problem with the open statement where providing a data file name (e.g. open "mydata.txt") in the prototype wasn’t finding the file in the document’s folder unless its specification contained an initital path separator (e.g. open ":mydata.txt"). (Mac OS only)
  • When putting tagged text, paragraph and character overrides are no longer cleared when a paragraph marker is encountered. Instead, applying a paragraph style will clear all paragraph and character-level overrides as well as reset the active character style (to No Style, currently). Applying a character style will now clear only character-level overrides. Otherwise, extant styles and overrides persist across paragraph markers.
  • Fixed a problem where manually updating headers/footers associated with a text frame on the pasteboard might result in a crash.
  • All InData scripting events’ story parameters now accept either a story name (which can be an InData-applied label, an InDesign-native script label, or an InCopy label), a story object, or an arbitrary text-based story element object (any element of a story resulting in a text “selection”). So you can now do something crazy like:

    import data from myData ¬
      using prototype story (line 1 of myProtoStory) ¬
      into story (character 5 of myTargetStory)
    
  • When scripting, InData will now work properly with window-less documents. Since there’s no concept of a front-most document in this case, however, you’ll need to use the import event that now sits on the document object. (So all of InData’s events now sit on both the InDesign application object and the document object.) For example:
    tell myWindowlessDoc to import data from myData ¬
      using prototype story "proto" into story "target"
    

    NB: an import event sent to the application object will always attempt to use the front-most document (i.e. AppleScript’s document 1), while an event issued to a particular document will always attempt to use that document. Additionally, the specified prototype and target stories must exist within the target document.

  • When scripting, InData will now obey the user interaction setting.
  • For scripting, we added an optional showing dialog boolean parameter (default: true) to the import and headers update events which may be used to block the display of the import dialog without changing the user interaction level. For example:
    import data form myData using prototype story myStory ¬
      into story myTargetStory without showing dialog
    

    Note, however, that if the user interaction level is set to never interact, then this parameter will have no effect (i.e. never interact always wins).

  • When scripting, not showing the import dialog will inhibit document updating and scrolling.
  • Added “using InData” suffix to all scripting event descriptions to make InData-specific events easier to find.
  • Importing InDesign tagged text containing mark reference tags (used in headers/footers) will now import without issuing an error.
  • Fixed a problem where InData could crash when inserting continued text in a header/footer.
  • An extant selection is now properly restored after manually updating headers/footers.
  • Expanded the import dialog slightly to better display the names of data files with long paths or filenames.
  • The About dialog entry in the InDesign (on MacOS) and Help (on Windows) menus has been moved from an About Plug-ins sub-menu to a new About Em Software Plug-ins sub-menu.

Changes at 2/3.1 release

  • InData now imports full Unicode on input, where “full” is determined by InDesign (UTF-16 in 2.x and UTF-32 in CS).
  • InData now handles Unicode and long filenames in OS X (although some Unicode characters won’t display correctly in 2.x due to InDesign limitations). (Mac OS X only)

  • Headers/footers updating initiated from the UI (InCatalog > Update Headers/Footers) or via scripting (see below) are now undoable. Headers/footers updating performed automatically after an import remains not undoable.
  • Added new update headers scripting event (UpdateHeaders method on Windows) which triggers a headers update for the currently selected text story (just like the menuitem). Optionally, a story name may be specified with the using story parameter, to update that story’s headers.
  • Due to new features and limitations in InDesign CS, we made some changes to InData’s existing scripting language which may or may not affect you.

    On Mac OS we’ve had to eliminate our use of the so-called “direct object”, but we’ve managed to do this without changing the event syntax. Unfortunately, compiled scripts using InData events will need to be recompiled to work with this new event structure.

    What was the import data from file event has become import data with optional but mutually exclusive parameters from and from file that specify the data source. As before, a source provided using the from file parameter will be coerced, if necessary, to a file reference. The new from parameter may be used to provide text data directly or as an explicit file alias. For example:

    set DataRecord to "12345,RoboFlip,Battery powered pancake flipper,5.99"
    tell application "InDesign CS"
      import data from DataRecord ¬
        using prototype story "prototype" ¬
        into story "target"
    end tell
    

    would import data directly from the DataRecord string rather than from a file.

    On Windows, we’ve removed the InData prefix from the scripting methods. We’ve also added the ImportDataFrom method, which allows data to be drawn directly from a string, as well as the UpdateHeaders method (discussed above).

  • Data records containing more fields than those declared in the prototype (and more than the default a-thru-z fields) were causing phantom records to appear in the resulting document. These extra fields are now properly ignored so that each data record generates one (and only one) record within the document.
  • frameinfo(2) (aka boxinfo) now returns the 1-based index of the text frame on the page instead of unrelated and somewhat random values.
  • pageinfo(1) now returns the 1-based page number within the document rather than the page’s position on the spread.
  • Quoted subfields are now handled correctly, where each subfield may or may not be quoted on its own. Before, all subfields were expected to be within a single set of quotes placed on the field.
  • Multiple quotes at the end of a field (or subfield) are now handled correctly. The quoted field “””foo””” now produces “foo” (quotes are part of the data) rather than “foo””.
  • Fixed a problem with subfields where the subfield delimiter was being ignored. Subfields and the subfield operator now work correctly. (If you insert a whole field with subfields, the subfields are separated by discretionary returns (ZeroSpaceBreak characters), just as in Xdata.)
  • The filecontents() function should now work properly. Before, it was always producing an error stating the specified file could not be found.
  • Fixed a problem where Import from clipboard wasn’t always available when text was put on the clipboard in an application other than InDesign.
  • High-ASCII and Unicode characters may now be used as data delimiters in the Data Preferences dialog.

    Characters in the high-ASCII range (those whose codes are in the range 128 to 255) may be entered either directly (e.g. using Alt-0166 on Windows) or by entering the character’s code value (e.g. 166). Unicode characters may be specified using the 0xNNNN format, where character U+00A6 would be entered as 0x00A6.

  • An invalid delimiter entered in the Data Preferences dialog will now properly highlight the offending entry after the error dialog has been displayed.
  • Disabled automatic recomposition after every record, the original intent of which was to prevent all recomposition from being deferred to the end of the job (which could take a long time and make the machine appear frozen) but which significantly decreased performance when there were many records per page. If you’re concerned about long (potentially disconcerting) pauses at the end of your job, you can use View every n records in the control panel.
  • Text files created in Mac OS X and ending with one of the extensions .txt, .csv, or .tsv are now selectable in InData’s File to Import dialog. (Mac OS only)
  • Fixed a problem which would crash InData if an illegal picture filename was specified (like "c:\images\foo.tif\"). (Windows only)
  • Fixed a problem reading Windows-generated Unicode data files using the UCS-2LE format (little-endian), where InData would appear to run but not process any data.
  • Fixed a problem where InData wasn’t consuming a UTF-8 format data file’s byte order mark, which could cause the first record’s first field to begin with a Zero-Space-No-Break character.
  • InData will now auto-sense Unicode data that begins with a byte order mark even if the Data Preferences specify a Mac OS or Windows character set.
  • Fixed a problem where some InDesign tags, including the encoding tag (e.g. <ASCII-WIN>), the version tag (Version/vsn), and the feature set tag (FeatureSet/fset), were being treated as plain text rather than being absorbed.

WordPress.org

© 2010 Em Software - Business WordPress Theme by ThemeShift