Re: Associating a condition with a paragraph/char format
In your code, you test for the paragraph format of the current paragraph. If it is the one that should have the condition, you apply it. If not, you ignore it.
View ArticleRe: Associating a condition with a paragraph/char format
Hi Rick, Adding a case for FA_Note_PreFunction yields the same error message. I am probably missing something. Please, advise. I remember it worked for you in FM11 but not in FM10. Thank you! Roman
View ArticleRe: Associating a condition with a paragraph/char format
You are no longer going to test for the function number because it does not work with FM 10. Instead, you are going to test for the paragraph format of the paragraph containing the cursor, and you are...
View ArticleRe: Associating a condition with a paragraph/char format
See if the code below makes sense to you. #target framemaker var pgfName; // Global variable. setupNotifications (); function setupNotifications () { // Set notifications for before and after...
View ArticleRe: Associating a condition with a paragraph/char format
Hi Rick, First of all, thank you for writing this script! It helped me learn more about Extendscript. I am surprised that Adobe haven't released any ES documentation yet - real shame. Yesterday, I...
View ArticleRe: Associating a condition with a paragraph/char format
Hi Rick, Did you have a chance to look at my questions? Thanks!Roman
View ArticleRe: Associating a condition with a paragraph/char format
Hi Roman, I am sorry, but I have been very busy and haven't had time to answer your questions. Do you have any budget for training or script help? We could schedule a web meeting where I could answer...
View ArticleRe: Associating a condition with a paragraph/char format
No problem, Rick. I am glad to hear that you are busy. Thanks again for the help you had provided so far! My best wishes,Roman
View ArticleHow to get the flags for GetText()?
Hello, The Fm 10 Scripting Guide seems to say that the flags parameter for GetText() is a bitmask, and I should OR constants to get different kinds of text items and so forth. Is this really true or is...
View ArticleRe: How to get the flags for GetText()?
I just use a pipe symbol to OR in the constants I need. For example, this one gets paragraph begins and table anchors in a single text list: var textList =...
View ArticleRe: How to get the flags for GetText()?
Thanks for that simple answer Rick, I appreciate it. I knew it was simpler than the docs presented it. Assuming that ExtendScript technical writers monitor this forum (and for anyone else with a...
View ArticleIs Find() dependable or should I use something else?
I'm trying to use Doc.Find() to find paragraphs that have changebars. Is Find() advisable generally or should I spend my time using some other method, like iterating through Pgf objects? I'm also...
View ArticleRe: Is Find() dependable or should I use something else?
I don't like to use Find in FrameScript for this type of thing, so I wouldn't recommend it with ExtendScript either. I prefer to inerate through paragraphs, then check each paragraph for...
View ArticleRe: Is Find() dependable or should I use something else?
So is this a reasonable way to find a changebar: var doc = app.ActiveDoc;var pgf = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf; while(pgf.ObjectValid()) { var textitems =...
View Articlecan i keep original image names when i save a document as html?
Hi,I've a document with references of all documents of book , a reference page that define styles and structure of document. When I save the document as html, it's work fine but the imagenes names is...
View ArticleHow can I autorun a script that will process an XML file on open?
I am using Frame 11. I have a registered script that looks for event notification Constants.FA_Note_PostOpenXML. When this event fires, the script is supposed to examine the root element (so I only...
View ArticleRe: How can I autorun a script that will process an XML file on open?
The Notify event receives four parameters: note, object, sparam, and iparam. For the event you are using, object should be the document object of the FrameMaker document being opened. So, you should be...
View ArticleRe: How can I autorun a script that will process an XML file on open?
Thanks! That did it.
View ArticleRe: Is Find() dependable or should I use something else?
My code above was not correct, it did not find changebars. I had to discover some arcane (to me at least) bitwise operator knowledge that is not included in the Fm docs. I realized that to find a...
View ArticleTextLoc works once, then stops working
I have this simple code: var doc = app.ActiveDoc;var t1 = new TextLoc();var firstPgf = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;t1.obj = firstPgf;doc.AddText (t1, "Hello"); When I ran it the...
View Article