frameexpert
Community Expert
frameexpert
Community Expert
Activity
6 hours ago
Mine is working here, but yours looks good too.
... View more
‎May 15, 2025
11:19 AM
I understand that this should just work, but if you get stuck and want a post-process script solution, please contact me offlist. Thanks. rick at frameexpert dot com
... View more
‎May 15, 2025
10:57 AM
You can do this for variables. Choose Edit > Preferences and go to the Variables tab.
... View more
‎May 15, 2025
05:34 AM
2 Upvotes
It looks like you figured it out. You could generalize the function to either add or remove change bars.
var doc, textRange;
doc = app.ActiveDoc;
textRange = doc.TextSelection;
applyOrRemoveChangeBar (textRange, 0, doc); // 0 remove; 1 apply
function applyOrRemoveChangeBar (textRange, value, doc) {
var prop;
// Make a property list containing the change bar.
prop = new PropVal ();
prop.propIdent.num = Constants.FP_ChangeBar;
prop.propVal.valType = Constants.FT_Integer;
prop.propVal.ival = value;
// Apply the property to the text.
doc.SetTextPropVal (textRange, prop);
} // End applyOrRemoveChangeBar
... View more
‎May 15, 2025
05:29 AM
1 Upvote
First of all, I don't see a call to the function in your code. Second, Constants and property names are case-sensitive. You want FP_ChangeBar (capital B).
var doc, textRange;
doc = app.ActiveDoc;
textRange = doc.TextSelection;
applyChangeBar (textRange, doc);
function applyChangeBar (textRange, doc) {
var prop;
// Make a property list containing the change bar.
prop = new PropVal ();
prop.propIdent.num = Constants.FP_ChangeBar;
prop.propVal.valType = Constants.FT_Integer;
prop.propVal.ival = 1;
// Apply the property to the text.
doc.SetTextPropVal (textRange, prop);
} // End applyChangeBar
... View more
‎May 14, 2025
11:59 AM
1 Upvote
Instead of prop.propVal.obj, try prop.propVal.ival.
... View more
‎May 14, 2025
11:58 AM
1 Upvote
Change Bar is a character property so it can be applied to one or more text characters. So first you have to find the character(s) that have the Change Bar property applied and then remove it. It's similar to what you did with the color property in one of your other posts.
... View more
‎May 12, 2025
01:52 PM
I am not opposed to using custom tools; after all, I make a living developing them for FrameMaker. Send me a link off list. Thank you. rick at frameexpert dot com
... View more
‎May 12, 2025
10:09 AM
FrameMaker has anchored frames that can contain multiple images, callouts, etc. As far as I know, InDesign doesn't have anchored frames that allow you to have multiple objects in it. Is that still correct?
... View more
‎May 12, 2025
08:42 AM
1 Upvote
I did some quick tests and it looks like these commands only work for images inside of anchored frames, not unanchored frames.
... View more
‎May 07, 2025
03:09 PM
F_ApiFcodes() is the Frame Developers Kit version of ExtendScript's Fcodes. I was trying to show you that Fcodes don't work to control Windows dialog boxes.
... View more
‎May 07, 2025
11:35 AM
‎May 07, 2025
08:39 AM
https://helpx.adobe.com/framemaker/kb/framemaker-downloads.html
... View more
‎May 06, 2025
05:28 PM
I am not sure what the problem is, but can you try an earlier download of 2022? The previous releases are here:
https://helpx.adobe.com/framemaker/kb/framemaker-downloads.html
and one of the earlier versions may install; for example 17.0.5.
... View more
‎May 06, 2025
12:17 PM
There is a Color Character Format applied to the paragraph. It is likely applied to the entire paragraph. Try selecting the paragraph and apply Default Para Font to clear out the Character Format. You may have to reapply the + List 1 Paragraph Format.
... View more
‎May 06, 2025
08:11 AM
Revert to saved could be done programmatically by simply closing the document without saving and then opening it again. You should make this a new post if you want to pursue it.
... View more
‎May 05, 2025
12:30 PM
I agree. Give me a pasteboard, ruler guides, configurable paragraph rules and paragraph shading.
... View more
‎May 05, 2025
09:04 AM
var showCondIndicators;
// Store the current condition indicator settings.
showCondIndicators = doc.ShowCondIndicators;
// ... do your thing
// Restore the original condition indicator settings.
doc.ShowCondIndicators = showCondIndicators;
... View more
‎May 05, 2025
08:20 AM
It may be starting with the second paragraph, but if it is probably catching the first paragraph as it loops around. This is one of the pitfalls of using text colors to mark text instead of Conditional Text.
One thing to try: turn off the Condition Indicators before running the script so that it doesn't find red conditional text.
... View more
‎May 05, 2025
07:29 AM
Good job! Thank you for the feedback.
... View more
‎May 02, 2025
08:19 AM
1 Upvote
var doc, textRange;
doc = app.ActiveDoc;
textRange = doc.TextSelection;
applyTextColor (textRange, "Black", doc);
function applyTextColor (textRange, colorName, doc) {
var color, prop;
// Get the color object.
color = doc.GetNamedColor (colorName);
// Make sure the color exists in the document.
if (color.ObjectValid () === 1) {
// Make a property list containing the color.
prop = new PropVal ();
prop.propIdent.num = Constants.FP_Color;
prop.propVal.valType = Constants.FT_Id;
prop.propVal.obj = color;
// Apply the color to the text.
doc.SetTextPropVal (textRange, prop);
}
}
... View more
‎May 02, 2025
08:13 AM
1 Upvote
Here is what you need to apply a color to the selected text. I suggest putting this in a function so that it's easy to call on a particular text range.
var doc, textRange, color, prop;
doc = app.ActiveDoc;
color = doc.GetNamedColor ("Black");
prop = new PropVal ();
prop.propIdent.num = Constants.FP_Color;
prop.propVal.valType = Constants.FT_Id;
prop.propVal.obj = color;
textRange = doc.TextSelection;
doc.SetTextPropVal (textRange, prop);
... View more
‎May 02, 2025
06:41 AM
1 Upvote
You need to create a property list, add the color to the property list, and then use SetProps to apply the color to the text range. Although this example, is applying a character format name, not a color, the premise is the same.
prop = new PropVal ();
prop.propIdent.num = Constants.FP_CharTag;
prop.propVal.valType = Constants.FT_String;
prop.propVal.sval = name;
doc.SetTextPropVal (textRange, prop);
... View more
‎May 01, 2025
07:28 AM
Right. I was just giving you a head start on some of the concepts. You could use my code to change your text back to black as long as all paragraphs should be black by default.
... View more
‎Apr 30, 2025
12:12 PM
@Matt-Tech Comm Tools You're right Matt. I missed that.
... View more
‎Apr 30, 2025
05:41 AM
@Jeff_Coatsworth is right. The List of References will be a separate document, but you can import it into your main document as a text inset.
... View more
‎Apr 29, 2025
11:37 AM
main ();
function main () {
var doc;
doc = app.ActiveDoc;
if (doc.ObjectValid () === 1) {
processDoc (doc);
}
}
function processDoc (doc) {
var color, pgf;
// Get the color object.
color = doc.GetNamedColor ("Red");
if (color.ObjectValid () === 1) {
// Get the paragraph where the cursor is.
pgf = doc.TextSelection.beg.obj;
if (pgf.ObjectValid () === 1) {
// Color the paragraph.
pgf.Color = color;
}
}
}
... View more
‎Apr 29, 2025
06:19 AM
1 Upvote
I have done scripts like this over the years, but I used form fields so that I could have a tool tip popup on the callout that would indicate the part number and description. They linked back to the table and the table linked back to the callout on the illustration. These were first written with FrameScript in the early 2000's and, suprisingly, at least two of my clients are still using them. Here is a small screenshot.
There are several things that have changed over the years that make this solution less practical.
I did most of these in conjunction with Microtype's TimeSavers add on for Distiller. This allowed me to use markers in the callouts and table cells instead of relying on PostScript text frames.
FrameMaker 2019 and above uses a non-PostScript print engine, so these features only work if you use Distiller to make your PDFs. This bypasses the faster print engine of the later versions.
Some PDF viewers on tablets and phones don't support Acrobat JavaScript, which my form fields used for some of the functionality. One client had me modify the scripts to just use links instead of form fields. As a result, they no longer have the part number/description tool tips on the callouts (see the screenshot).
... View more
‎Apr 28, 2025
09:56 AM
1 Upvote
Even if you decide to do it manually, I would still suggest you try Condition Formats instead of just changing font colors. You can search for Condition Formats too.
... View more
‎Apr 28, 2025
08:51 AM
1 Upvote
Changing text properties is always tricky because it can be difficult to revert to the default settings. The best way to do this in FrameMaker is to use Conditional Text because, while you can show the condition indicator (red text, etc.), it doesn't affect the underlying text properties. Plus, you can temporarily hide the condition indicator for printing, etc.
All of what you asked about is scriptable, although it's complex enough where it will likely require some cost. I would be glad to discuss the project with you off list. Alternatively, you could break these down into multiple tasks and post them as individual questions here on the forum.
... View more