Re: Best way to copy range of paragraphs
Hi Mark, You could simplify the script here and there. I find it easier to create a TextLoc while passing the parameters to it at the same time. Saves a number of code lines, making the code more...
View ArticleRe: can i keep original image names when i save a document as html?
Hi, I think you need to give us a little more information. Maybe an example of changed names. Jang
View ArticleRe: FM11 hanging/crashing with FrameScript 5
I have the same setup: Win 7, Frame 11, and Framescript 5.2 R1 and have no problem running my scripts. I suspect it is something in your script. Have you used these scripts before? If so, what has...
View ArticleRe: FM11 hanging/crashing with FrameScript 5
Hi Rick Thanks for your reply. I also received a quick response from the Elmsoft FrameScript support guys. As you suspect, they too think the problem is with the script itself. The script I am using...
View ArticleRe: Best way to copy range of paragraphs
Thanks for saving me 13 lines of code Jang. I am also going to try out your other suggestions for elegance. Here's the trimmed-down code: function pasteChanges(doc, changePgf) { // Select paragraph...
View ArticleRe: Best way to copy range of paragraphs
Hi Mark, Glad you are making progress. About the Pgfs in tables: yes, they are in a world of their own. Each table is a more or less closed object anchored to a paragraph in the document. You can step...
View ArticleInfinite loop with pgf.ObjectValid
Why would this result in an infinite loop? I thought that wehn it got to the last Pgf object it should become invalid and stop. var doc = app.ActiveDoc; var pgf =...
View ArticleRe: Infinite loop with pgf.ObjectValid
Whoops, never mind, I had a misplaced end bracket of the while. This is fixed now: var doc = app.ActiveDoc;var pgf = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;while ( pgf.ObjectValid() ) {...
View ArticleHow to access a table for changes
I'm iterating through the Pgf objects in a flow, and for each one I look for table anchors. I find the table anchor, then what do I do to access its Tbl object and do things with it? I'm just trying to...
View ArticleRe: Infinite loop with pgf.ObjectValid
Hi Mark, After I ran into this and similar problems a couple of times, I changed my styling to always put the opening curly bracket on the next line. In that way, the closing bracket is at the same...
View ArticleRe: How to access a table for changes
This should give you the Tbl (table) object: myTable = textItems[0].obj;
View ArticleRe: How to access a table for changes
Rick, interesting. I would have thought to use .idata. For .idata, the documentation says: ID of the object if the text item is an object,. ...then it says something cryptic for .obj. Seems I've used...
View ArticleRe: How to access a table for changes
Hi Russ, I just checked some of my code and it is obj. Here is how I navigate all of the tables in the document's main flow: var tbl = 0, textList = 0, i = 0; textList =...
View ArticleRe: How to access a table for changes
Thanks Rick. I guess the documentation is a bit unclear (shocker!). In defense of the documentation, though, I recognize it is a major task to document such a huge interface. I think the first issue...
View ArticleRe: How to access a table for changes
FYI, I am working on a user-friendly (or developer-friendly) documentation in the shape of a website. I have noted the info about the table object, as well as other errors and omissions I have found...
View ArticleRe: How to access a table for changes
There are two approaches they could have used: 1) Make a copy of the FDK docs and modify them for ExtendScript. That would have at least given a good overview and provided some examples. 2) Have a...
View ArticleRe: FM11 hanging/crashing with FrameScript 5
Thanks to all who replied to my question.And to Rick Quatro for the prompt diagnosis! I have been using the same script since 2005 (to produce linked callouts in a Parts Catalog).Although nothing has...
View ArticleRe: How to access a table for changes
Hi Rick, I have seen Deba Herman's blog but it has been virtually dead for almost two years now. I can understand that, as my own blog has been in a 'restful' state for a while now. I would be...
View ArticleCode to Save As PDF
Hi, Does anyone have any code for saving a document as PDF? I don't need an entire script, just a chunk of code that shows the save parameters. Thanks in advance. --Rick [moved to FM scripting forum by...
View ArticleHow to insert a new paragraph?
I want to insert a paragraph with something like a line, to separate hunks of text I am pasting into a document. I see no obvious way to do this. I see no AddPgf() function, for example. And no...
View Article