Skip to main content
Loic.Aigon
Legend
March 16, 2011
Question

Can't get acces to text on path embedded into rectangle

  • March 16, 2011
  • 1 reply
  • 593 views

Hi,

I can't get access to  a text by scripting. It's on a path embedded into a rectangle. The path is xml tagged.

Rectangle.paths seems not to have any property to get the text, nor the XML structure.

You may want to download the rar file and see by yourself. I just can't get access to the text.

Any ideas ?

TIA Loic

http://www.loicaigon.com/texte.zip

This topic has been closed for replies.

1 reply

John Hawkinson
Inspiring
March 16, 2011

404 Not found for your file.

But app.selection[0].textPaths[0].contents works fine for me.

Loic.Aigon
Legend
March 16, 2011

Hi John,

my badd for url :

http://www.loicaigon.com/downloads/texte.zip

here I get error

John Hawkinson
Inspiring
March 16, 2011

>> app.selection[0].graphicLines[0].textPaths[0].contents
medium

How to figure it out? Try this:

function id(o) { var i, j, k=[];

  for (i in o) {

    if (o.hasOwnProperty(i)) { k.push(i) }

  }
  k.sort();
  for (i=0; i<k.length; i++) {  j=k; try {

    if (app.selection[0].length) {

      $.writeln(j+"\t"+app.selection[0].length);

    } catch (e) {  }

  }

}
id(app.selection[0])

which gives you:

allPageItems     1
geometricBounds     4
gradientFillStart     2
gradientStrokeStart     2
graphicLines     1
pageItems     1
paths     1
preferences     10
splineItems     1
visibleBounds     4
undefined

and then it's all downhill from there