fmPython

Keith Arnett Keith.Arnett at webMethods.com
Fri Apr 7 07:32:19 PDT 2006


Hi all,

I had some trouble posting to the list, and first of all, many thanks to
Lisa for her administrative help in getting that straightened out.  I was
*most* impressed to receive an actual phone call (!), a rarity these days.
Thanks again, Lisa.

So, although this topic may be a bit stale, I thought I would send it along
to see if everything is working now. :-)

I've used fmPython with FM 7.0 extensively and successfully. I would have
preferred FrameScript, but at the time I was working as a lone writer for a
start-up, and dollars were scarce.

You can place the script (convTI.py) in any convenient location. The
procedure that works for me is:

1. Open the FM book you want to work with.
2. Use the FrameMaker File > Open menu command to open the script. The
Unknown File Type dialog box appears, with "Text" preselected.
3. Click Convert. The Reading Text File dialog box appears.
4. Select the Treat Each Line as a Paragraph option.
5. Select ASCII encoding.
6. Click Read. The script opens in FrameMaker.
7. Click anywhere in the script to place the cursor in the document.
8. Choose the fmPython > Selection as script menu command. The script is now
enabled for PDF processing.
9. With the focus on the book, click the fmPython>Execute script menu
command.

You can find the script at:

http://www.isnet.sk/petrucha/?lang=en&page=scripts

Danger, Will Robinson!! I strongly advise that you save a complete backup of
all files before you run the script. Why? Because the "Save All Files In
Book" menu command is immediately adjacent to the "Close All Files In Book"
menu command on the FM File menu. The script opens all files in the book and
enables you to convert all of the text insets to plain text. After you run
the script, all it takes is a single mis-click to save all of your book
files with no text insets. Arg.

Do not fool yourself into thinking you will be really careful and do not
need to copy the files to the backup location. Take it from someone who has
learned the hard way. :-) It isn't a total disaster because you can always
re-import the text insets, but it *is* a major waste of time.

Thanks,

Keith
 
--------------------------------
Keith Arnett
Senior Technical Writer
webMethods, Inc.\ Fairfax VA
703-460-5927
Mobile: 540-671-1954



More information about the framers mailing list