🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8890

[AS CS2] Bug report XML markup text in table

#8890
From: Peter_Dewitte
Date: Fri, 22 Sep 2006 10:37
49 lines
1673 bytes
Hello,

I have to automate the following steps:

With selected text

1. Create an XML Tag with the name of the Applied Paragraph Style of this text

2. Create an XML element using the previous XML Tag

3. Markup the text using the previous XML element

The following script works fine for text in a Story.

But when the selected text is in a cell of a table, InDesign is crashing and quitting.
The crash happens with Markup method.

set myStory to object reference of selection of document 1

repeat with i from 1 to count paragraphs of myStory

  set myParagraphStyle to name of applied paragraph style of paragraph i of
  myStory

    tell XML item 1 of document 1

      try

        set myXMLelement to make new XML element with properties {markup tag:myParagraphStyle}

      on error

        set myXMLelement to make new XML element with properties {markup tag:"NoStyleName"}

      end try

    markup paragraph i of myStory using myXMLelement

  end tell

end repeat

Is this a bug? Or do I have a bad script here?

Does anyone has a solution?

Thanks in advance,

Peter
Technical Details
Message-ID: <3bc1bc50.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!news.isoc.lu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,6f31ea9068fdbf3c,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Peter_Dewitte@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: [AS CS2]  Bug report XML markup text in table
Message-ID: <3bc1bc50.-1@webcrossing.la2eafNXanI>
Date: Fri, 22 Sep 2006 03:37:34 -0700
Lines: 53
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit