Thread View: adobe.scripting.indesign
3 messages
3 total messages
Started by Keith_Gilbert
Fri, 27 Mar 2009 20:15
[JS CS4] how to add text to a rectangle
Author: Keith_Gilbert
Date: Fri, 27 Mar 2009 20:15
Date: Fri, 27 Mar 2009 20:15
15 lines
1028 bytes
1028 bytes
I understand that I can add text to a text frame with: myTextFrame.contents = "this is text" which works as long as myTextFrame is indeed a textFrame. However, now I have a rectangle, for which I have converted the content type to Text, via: myGraphicFrame.contentType = ContentType.TEXT_TYPE So why can't I now add text to the frame with: myGraphicFrame.contents = "this is text" ?
Re: [JS CS4] how to add text to a rectangle
Author: Dave_Saunders
Date: Fri, 27 Mar 2009 22:02
Date: Fri, 27 Mar 2009 22:02
7 lines
777 bytes
777 bytes
Because JavaScript still thinks it's a rectangle and so the contents property doesn't work. I think this will work: myGraphicFrame.getElements()[0].contents = "this is text" Dave
Re: [JS CS4] how to add text to a rectangle
Author: Keith_Gilbert
Date: Mon, 30 Mar 2009 20:17
Date: Mon, 30 Mar 2009 20:17
1 lines
628 bytes
628 bytes
This works perfect. Thanks a lot Dave!
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads