Copy link to clipboard
Copied
Hi,
Sure is hard to find out anything about Extendscript. I googled and saw several sites that mentioned a number of scripts that were supposed to come with FM10. I only have six:
AddTableHighlighting
AlignAnchoredFrame
RemoveTableHighlighting
SaveAsFM8
SaveAsFM8_Event
UnlockLockTextInsets
I'm looking for the one to flatten conrefs. Thanks!
Duh! Thanks, Ian.
Copy link to clipboard
Copied
On my Windows 7 system the scripts are here:
C:\Program Files (x86)\Adobe\AdobeFrameMaker10\Samples\ScriptsAndUtilities\Flatten Conrefs
Ian
Copy link to clipboard
Copied
Duh! Thanks, Ian.
Copy link to clipboard
Copied
Okay, thanks to Ian I have now found the script to flatten a conref. Has anyone used this script? I am very new at this and wonder how this all works. Here are my questions:
Do I just open a book or xml file and then select File > Script > Run and then select the flattenconref.jsx file? I don't see anything happening when I do this. There's no confirmation that anything has run or been accomplished.
Even more disturbing, when I select this conref from the script library, only asterisks display in the description box. Is that normal?
My understanding from the small amount of information that exists about flattening conrefs is that I no longer have to have the conrefs open in the background for them to display in my book file. However, if I flatten a conref, it ceases to act like a conref. Is my understanding correct?
If anyone has any resources that can help me understand scripting better, please let me know.
As always, thanks in advance for any assistance.
Mary
Copy link to clipboard
Copied
When you run the script it will create a new DitaUtility menu. This has two commands:
If you click Move to AutoRun from the script library dialog, the new menu will be available each time you start FrameMaker.
The Asterisks are the first part of the commented section at the start of the file. It's nothing to worry about! It would be more helpful if Adobe put useful comments in the script files...
The best resources for getting to grips with FrameMaker scripting are some really good books such as "JavaScript: The definitive guide" and "JavaScript: The Good Parts" both published by O'Reilly. The FDK developer's guide is the best place to learn about programming FrameMaker. While the Scripting guide is now available from the help system's home page.
Also Debra Herman has the Extending FrameMaker blog at http://extendingframemaker.blogspot.com/
Enjoy your scripting!
Ian
Copy link to clipboard
Copied
Okay, Ian, it’s becoming a little clearer. One more question though.
By clicking Move to AutoRun, the script will automatically flatten conrefs in both topicrefs and ditamaps?
Thanks so much for your help.
Mary
Copy link to clipboard
Copied
Hi Mary,
No, the Move to Auto Run will simply copy the script into the startup folder. That means you don't have to run the script manualy to see the DitaUtility menu. You will always need to select the relevant menu command to flatten any conrefs.
Ian
Copy link to clipboard
Copied
Ian,
Every time I open up FM now, I get the following Script Error Message:
Error in C:\Documents and Settings\mgreer1\Application Data\Adobe\FrameMaker\10\startup\FM_Flatten_Conrefs.jsx
Line 23: #include “FM_lib.jsx”
File or folder does not exist
What does this mean?
Copy link to clipboard
Copied
I think you have found a weakness in the Move to AutoRun feature. The Flatten conrefs script also needs the included FM_lib.jsx file to be in the startup folder. You can copy this manually from the ScriptsAndUtilities\Flatten Conrefs folder into the startup folder.
The error message tells you that on line 23 of the script there is an #include directive that points to the FM_lib.jsx file (which contains further parts of the script).
Ian
Copy link to clipboard
Copied
You’re a peach, Ian. Thanks for the many Christmas presents – and early too!