On my Windows 7 system the scripts are here:
C:\Program Files (x86)\Adobe\AdobeFrameMaker10\Samples\ScriptsAndUtilities\Flatten Conrefs
Duh! Thanks, Ian.
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.
When you run the script it will create a new DitaUtility menu. This has two commands:
- Flatten conrefs in topicrefs
- Flatten conrefs in ditamap
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...
Also Debra Herman has the Extending FrameMaker blog at http://extendingframemaker.blogspot.com/
Enjoy your scripting!
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.
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.
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?
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).
You’re a peach, Ian. Thanks for the many Christmas presents – and early too!